summaryrefslogtreecommitdiff
path: root/.htaccess
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-06-09 05:08:16 +0000
committerDries Buytaert <dries@buytaert.net>2009-06-09 05:08:16 +0000
commit8f2c63ea25db51f2fc80bd5b7cbc2e5ff6acf823 (patch)
tree7f28f6239c1611ca82a8aff4ffa04e2c045de017 /.htaccess
parentc2e2027f3db94f4a30cad6e73b714c031a731e88 (diff)
downloadbrdo-8f2c63ea25db51f2fc80bd5b7cbc2e5ff6acf823.tar.gz
brdo-8f2c63ea25db51f2fc80bd5b7cbc2e5ff6acf823.tar.bz2
- Patch #352180 by Garret Albright, wrwrwr: better multi-site friendly 'www' addition/removal in .htaccess.
Diffstat (limited to '.htaccess')
-rw-r--r--.htaccess12
1 files changed, 6 insertions, 6 deletions
diff --git a/.htaccess b/.htaccess
index 35059cd60..f38fe6304 100644
--- a/.htaccess
+++ b/.htaccess
@@ -64,15 +64,15 @@ DirectoryIndex index.php index.html index.htm
#
# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
- # adapt and uncomment the following:
- # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
- # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
+ # uncomment the following:
+ # RewriteCond %{HTTP_HOST} !^www\. [NC]
+ # RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
- # uncomment and adapt the following:
- # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
- # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
+ # uncomment the following:
+ # RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
+ # RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301]
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.