Created
March 31, 2015 12:55
-
-
Save raf-sh/0cafb9f40d3b967fce79 to your computer and use it in GitHub Desktop.
redirect to no-www and from index.(php|html|htm) to /
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] | |
RewriteRule ^(.*)$ http://%1%{REQUEST_URI} [R=301,QSA,NC,L] | |
RewriteCond %{THE_REQUEST} ^.*/index\.(php|html?) | |
RewriteRule ^(.*)index.(php|html?)$ /$1 [R=301,NC,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment