Last active
August 29, 2015 14:08
-
-
Save pteich/8f326b3af625cdaa9c62 to your computer and use it in GitHub Desktop.
Apache Redirect non www to www subdomain (httpd.conf or .htaccess)
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
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^(?!www\.)(.+) [NC] | |
RewriteRule ^(.*) http://www.%1$1 [R=301,NE,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment