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 - 10:13 pm on Jul 28, 2011 (gmt 0)


However it breaks my subdomains! I've got a subdomain, lets call it 'test.mysite.com' which works find if I remove that canonical code, otherwise it redirects to www.mysite.com

Time for a chorus of "I really hate that ### machine" et cetera. OK, so the blasted .htaccess is doing exactly what you told it to do. How 'bout replacing the condition with

RewriteCond %{HTTP_HOST} ^canuckabroad\.com

so it bypasses all subdomains. Now, if you're concurrently throwing out some-but-not-all subdomains and want them, too, to end up at www.why-is-it-so-warm.com, then you have to start adding stuff.


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