Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- 301 Canonical redirect - non-www to www but it messes with subdomains


lucy24 - 3:00 am on Jul 29, 2011 (gmt 0)


You mean that all subdomains except one specific one are all supposed to end up at www.it-isn't-called-ice-hockey.com? Then you need one more line in your conditions:

RewriteCond %{HTTP_HOST} !^www\.canuckabroad\.com [NC]
RewriteCond %{HTTP_HOST} !nicesubdomain\.canuckabroad\.com

That is: if the host isn't www.so-you-call-that-english-eh.com, and also isn't the subdomain you want to protect, then proceed to the Rule. In Conditions, the default connector is AND: the whole list has to be true. Just pile on the conditions. You can also merge them if there's more than one Good Subdomain:

RewriteCond %{HTTP_HOST} !(nicesubdomain|evennicersubdomain)\.canuckabroad\.com


Thread source:: http://www.webmasterworld.com/apache/4345202.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com