Skip to content

Commit

Permalink
Merge pull request twbs#646 from ngryman/master
Browse files Browse the repository at this point in the history
generic rewrite rules (for virtual host context)
  • Loading branch information
paulirish committed Aug 9, 2011
2 parents 99e140d + 00d8b84 commit 55a7fc2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .htaccess
Expand Up @@ -333,7 +333,7 @@ FileETag None
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
</IfModule>

# ----------------------------------------------------------------------
Expand All @@ -346,8 +346,7 @@ FileETag None
# <IfModule mod_rewrite.c>
# RewriteCond %{HTTPS} !=on
# RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
# RewriteCond %{HTTP_HOST} (.+)$ [NC]
# RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]
# RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# </IfModule>


Expand Down Expand Up @@ -382,7 +381,7 @@ FileETag None

# <IfModule mod_rewrite.c>
# RewriteCond %{SERVER_PORT} !^443
# RewriteRule (.*) https://example-domain-please-change-me.com/$1 [R=301,L]
# RewriteRule ^ https://example-domain-please-change-me.com%{REQUEST_URI} [R=301,L]
# </IfModule>


Expand Down

0 comments on commit 55a7fc2

Please sign in to comment.