Strange redirect in subdomain problem?

dangul

Verified User
Joined
Nov 17, 2008
Messages
34
Location
Sweden
Hi, we got a strange problem on one of our customers:

She got a domain (we call this domain.com) and a subdomain (this we call sub.domain.com). In the domain.com´s directory she got a .htaccess with:

Redirect / http://super.com/mega

And the sub.domain.com has NO .htaccess or other redirects.

The strange is that when customers access sub.domain.com they will be redirected to http://super.com/mega ??
Is there any who has a clue why this happens?

sub.domain.com should be isolated and should not se domain.com´s htaccess file?

In the filesystem:

domain.com -> /home/test/domain/domain.com/public_html
sub.domain.com -> /home/test/domain/domain.com/public_html/sub


Thanks
Daniel
 
Try:

Code:
Options +FollowSymLinks 
RewriteEngine on

RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteCond %{HTTP_HOST} !^sub\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://super.com/mega [R=301,L]
 
sub.domain.com should be isolated and should not se domain.com´s htaccess file?

In the filesystem:

domain.com -> /home/test/domain/domain.com/public_html
sub.domain.com -> /home/test/domain/domain.com/public_html/sub

Not true at all. The .htaccess in any directory will affect all the subdirectories under it.

If you really want the subdomain to be completely isolated then you need to add it as a regular domain and not a subdomain.
 
sub.domain.com should be isolated and should not se domain.com´s htaccess file?

In the filesystem:

domain.com -> /home/test/domain/domain.com/public_html
sub.domain.com -> /home/test/domain/domain.com/public_html/sub
Not true at all. The .htaccess in any directory will affect all the subdirectories under it.
 
Back
Top