1

I realise this question has been asked tons of times before on the forum but I've eliminated all the usual suspects in my case and still Im not having much luck with this problem.

The www.mydomain.net works fine but the mydomain.net takes me to the Apache test page.

Here's my DNS entries

A        mydomain.net          123.456.244.456
CNAME    www.mydomain.net          mydomain.net           

Here'e my apache config:

ServerName www.mydomain.net
ServerAlias  mydomain.net

RewriteEngine on
RewriteCond %{HTTP_HOST}   !^www\.mydomain\.net [NC]
RewriteCond %{HTTP_HOST}   !^$
RewriteRule ^/(.*)         http://www.mydomain.net/$1 [L,R]

copied straight from the Apache docs.

The interesting thing is that mydomain.net ALWAYS goes to the apache test page. Regardless of whether I make it a ServerName or ServerAlias.

1 Answers1

2

Are you using virtual servers on Apache? If so, there may be a default site configured that is causing any domain not 'www.mydomain.net' to be handled by the default handler. As a quick check, try abc.mydomain.net and see if you get the apache test page.

sayeed
  • 394
  • 3
  • 8
  • Yes that was right. I had a default site config that was placed under sites-enabled by apache that I had not taken out. Did not realize that could be the problem. Still not sure why that would be the case. – UDIT MANEKTALA Mar 16 '11 at 03:04