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?


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?

closed as off-topic by Hyppy, Jenny D, fuero, Jim B, EEAA May 4 '15 at 21:16

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.


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.

  • 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
  • glad i saw this post before i was going to start looking at and playing with httpd.conf – Angry 84 Feb 7 '15 at 13:13
  • I know we shouldn't post thank you comments, but after losing 3 hours of my life, I really have to say thank you! – Marco Aurélio Deleu Mar 22 '16 at 21:48

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