URL-. : , http_host . , Thawte "www" . , "www":
RewriteCond %{HTTP_HOST} ^www\.mysite\.com [NC]
RewriteRule ^(login\.php|members\.php)$ https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{HTTP_HOST} ^mysite\.com [NC]
RewriteRule ^(login\.php|members\.php)$ https://www.${HTTP_HOST}%{REQUEST_URI}
Or, to do this in a slightly smaller space, you can discard the second line and hard-code the domain in 4th. I am sure there is a more elegant way to do this, but htaccess is disappointing and it works.
source
share