Scott Blackburn's Library tagged → View Popular
13 Oct 09
Access all multisites with www. only [.htaccess] | drupal.org
-
# non empty HTTP_HOST in the request
RewriteCond %{HTTP_HOST} !^$ [NC]#here you exclude a domain from the universal rules
RewriteCond %{HTTP_HOST} !^www\.excepteddomain\.com$ [NC]
RewriteCond %{HTTP_HOST} !^excepteddomain\.com$ [NC]# the hostname does start with 'www.'
RewriteCond %{HTTP_HOST} ^www\. [NC]
# let's extract the hostname without 'www.' and save it to %1
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
# let's redirect to the extracted hostname, $1 saves the URL
RewriteRule ^(.*)$ "http://%1/$1" [L,R=301]#here are the rules for the excepted domain
RewriteCond %{HTTP_HOST} excepteddomain\.com$ [NC]
RewriteCond %{HTTP_HOST} !^www\.excepteddomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.excepteddomain.com/$1 [L,R=301]
1 - 3 of 3
Showing 20▼ items per page
Sponsored Links
Ads by Google
Top Contributors
Groups interested in htaccess
Related Lists on Diigo
-
htaccess
Items: 2 | Visits: 4
Created by: kanegae kenta
-
web development
Items: 1 | Visits: 1
Created by: damnit damnit
Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »
Join Diigo
