Tag Info

Hot answers tagged


For your first two rewrites (non-www → www, http → https), the following rule should work: RewriteEngine On RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} !=www.example.com [NC] RewriteRule ^(.*) https://www.example.com/$1 [NS,L,R=permanent] Just replace www.example.com with the actual canonical hostname of your site. As for your third ...


The use of a rewrite condition along with a rule to map transparently to the subdirectory should work. RewriteCond %{HTTP_HOST} ^abc\.mybiz\.domain\.com$ [NC] RewriteCond %{REQUEST_URI} ^(/|.*\.html)$ [NC] RewriteRule ^/(.*)$ /abc/$1 [L] Now when a request for http://abc.mybiz.domain.com/ or http://abc.mybiz.domain.com/index.html is made it will be pulled ...

Only top voted, non community-wiki answers of a minimum length are eligible