I know this is more of an apache question than a cPanel question, but it connects to the way cPanel sets up add-on domains, so asking here.
Given main domain blue.com and the add-on domain green.com, the customer doesn't want his Google pagerank confused by having blue.com and www.blue.com both equally available. All requests for www.blue.com should resolve to blue.com. So we set up this rewrite rule:
Which works fine for blue.com. But because in cPanel green.com is a directory under blue's public_html, the .htaccess for blue.com also affects green.com. This is a problem in general, but here specifically, what happens is that the condition is matched for ALL requests on green.com, the rule kicks in, and the browser is redirected to blue.com.Code:RewriteEngine on RewriteCond %{HTTP_HOST} !^blue\.com RewriteRule ^.*$ http://blue.com%{REQUEST_URI} [R=301,L]
Is there a way to make the .htaccess for blue.com NOT affect green.com?
And no, putting a separate/equivalent .htaccess in the green dir does not fix it
Thanks,
Scot



LinkBack URL
About LinkBacks

Reply With Quote




