sub domain shows folder name rather than host name?
Hi guys,
Having a small issue with subdomain...
When I create a subdomain in cPanel, it creates new folder etc under public_html which is all good.
but then when I type in the address, the url changes to the public_html/folder rather than showing the actual domain name.
ie, say if my domain was "www.test.com" and I want a subdomain of "sub", if I type in "sub.test.com" it will send me to the right page (public_html/sub/) but the address bar of the browser also changes to "www.test.com/sub"
How do I fix this so it will show "sub.test.com" instead of "www.test.com/sub" ?
Thanks :)
-
Hello :) It seems like this is happening due to custom redirect rules because it's not the standard behavior. Do you have any Mod_Rewrite rules configured within any of the .htaccess files on your account? Thank you. 0 -
Thanks for the info. I tried removing .htaccess file and it indeed fixed the issue. What does the file do and do I need that file? WHen does that file get created? Thanks :) 0 -
Hello, By default .htaccess files are usually empty when the account is created. It's used for redirects within cPanel and also to password protect directories. However, other software (WordPress, Joomla, Drupal and a slew of others) can also modify this file. It might contain something that is not compatible with the standard redirect cPanel uses. You'd have to examine the file and see if you can figure it out. 0
Please sign in to leave a comment.
Comments
3 comments