Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

have just moved to a dedicated server.. but why can it be that domain.com redirects to www.domain.com?

I haven't done any mod_rewrite yet?!

webserver: apache 2.2

what could be the cause?

<VirtualHost *:80>
    ServerName domain.com
    ServerAlias *.domain.com
    DocumentRoot /var/www/domain.com
</VirtualHost>

The dns server also only have one A record

* (wildcard) A 0.0.0.0 (ip)
share|improve this question
    
Are you using Google Chrome ? –  Janis Veinbergs May 25 '11 at 10:03
    
what kind of website do you host on that server? Maybe it does that redirection itself via javascript or http-forward. –  wullxz May 25 '11 at 10:10
    
@wulluxz.. no because I have replace all content on index.php with <?echo 'test';exit;?> –  clarkk May 25 '11 at 10:14
    
hmm.. I have tested it in FF but when testing in IE there are no problems? is there some kind of cache I need to flush? –  clarkk May 25 '11 at 10:18
add comment

1 Answer 1

up vote 0 down vote accepted

after sperating each part of the rewrite rules into each directory (eg /var/www/domain.com) it helped

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.