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.

On my hosting account, I created a new subdomain in cpanel. Let's say, beta.mydomain.com.

When I try to access beta.mydomain.com it works perfectly. However, when I try to access beta.mydomain.com, it redirects me to beta.mydomain.com/cgi-sys/defaultwebpage.cgi

How do I fix this?

Edit:

It appears the .htaccess at the root of the webserver might have something to do with this as well. The rules are as follows:

RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !/beta/index.php$ RewriteRule ^(.*)$ /beta/index.php [R=302,L]

If I type in beta.domain.com/somedirectory, I get redirected to domain.com/beta/index.php because of the rules. How do I exclude beta.domain.com from the above rewrite rules?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Did you visit the subdomain before you added it in cpanel? If so, your browser might be caching the "<html><head><META HTTP-EQUIV="refresh" CONTENT="0;URL=/cgi-sys/defaultwebpage.cgi"></head><body></body></html>" bit cpanel serves if you visit an unknown hostname. You could try removing the cache or test it with another browser (or even with wget/curl). If apache actually still serves the default html, check if the subdomain is created properly.

share|improve this answer
    
Ok, further to the above edit, you're right - accessing from another computer just redirects me to domain.com/beta/index.php. Can you please help with the .htaccess rules? –  Donniel Thomas Jun 27 '11 at 20:57
    
    
Sorry about the late response. You were right, it was a caching issue! –  Donniel Thomas Jul 10 '11 at 5:52

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.