fingerprn

Active Member
Feb 19, 2007
32
1
158
One of my clients is having a weird subdomain problem. The account has 5 subdomains, but one of them isn't redirecting correctly. The subdomain is ang.mydomain.com but it's redirecting to www.mydomain.com/ang/

(To be clear, the folder is correct, but we don't want the URL to be www.mydomain.com/ang/)

I've tried removing and resetting the subdomain, but that didn't fix the problem. The DNS zone in WHM looks fine.

Any ideas? Thanks in advance for your help.
 

fingerprn

Active Member
Feb 19, 2007
32
1
158
They're using my nameservers. I manage their account for them. All 5 subdomains were set up through an account-level cPanel interface. It's been a few months since I set up the subdomain in question, so I can't remember if there were any errors when it was first set up (the subdomain is only now being used).
 

Sys Admin

Well-Known Member
Apr 29, 2007
67
0
156
cPanel Access Level
Root Administrator
They're using my nameservers. I manage their account for them. All 5 subdomains were set up through an account-level cPanel interface. It's been a few months since I set up the subdomain in question, so I can't remember if there were any errors when it was first set up (the subdomain is only now being used).
Is there any content within the ang dir at the moment? If so, I would suggest checking the .htaccess file for any rewrite statements that could be causing this redirection issue. Otherwise try removing and re-creating the subdomain again.
 

fingerprn

Active Member
Feb 19, 2007
32
1
158
That was it! Sort of.

It turns out that all of the other subdomains had an .htaccess file except that one. I'm not exactly sure why not having one would cause this problem, but since it's working now I'm not going to worry about it. Thank you for your help!

(BTW, for anyone else with this problem, don't forget to clear your local DNS cache after making the change. At first I thought the solution hadn't worked until I remembered to clear the cache.)
 

quietFinn

Well-Known Member
Feb 4, 2006
1,222
87
178
Finland
cPanel Access Level
Root Administrator
That was it! Sort of.

It turns out that all of the other subdomains had an .htaccess file except that one. I'm not exactly sure why not having one would cause this problem, but since it's working now I'm not going to worry about it. Thank you for your help!
Those subdomains reside in subdirectories, and if there is a .htaccess file in the root directory, settings in that .htaccess are in effect in subdirectory also, unless overridden in a .htaccess file residing in that subdirectory.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello :)

I am happy to hear the subdomain is now working as you expect it to. I am marking this thread as resolved.

Thank you.