Created
October 21, 2014 12:22
-
-
Save hmic/ed3d499fb181d3a0defc to your computer and use it in GitHub Desktop.
Addition to (cakephp) .htaccess to redirect non-www to www URLs
This file contains 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
# add this to redirect non-www to www urls | |
RewriteCond ${HTTP_HOST} !^www\. | |
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment