PDA

View Full Version : Subdomain Problem...


clickk
01-29-2007, 07:57 PM
I'm noticing that none of my subdomains are working properly. The way I have my website set up is that when you go to my website (http://hihiclickk.com) it would redirect to hihiclickk.com/gen2/. The way I'm getting this redirect done is with the header("Location ..."); line in my index.php file. This works fine for me until I try to use a subdomain. Whenever I do ANYTHING for a subdomain under hihiclickk.com (so even if I try ljsdlkfjsldkjflkjsdf.hihiclickk.com) it would still automatically redirect me to the gen2 directory. Obviously, lkjsdlkfjksjdlkfjsdf.hihiclickk.com isn't going to do me any good, but this problem persists even with proper subdomains, such as bctrick.hihiclickk.com.

What is the problem?? How do I fix it? Could it possibly be the method I'm using to redirect? If so, what other method should I be using to get this task done? On a side note, if I access the subdomain not as a subdomain, but as a regular directory underneath hihiclickk.com (ie. http://hihiclickk.com/bctrick/) then it works properly. It' just whenever I have something.hihiclickk.com it would automatically redirect to my gen2 directory. Thanks for the help in advance.

agcssautomotive.com
01-29-2007, 09:28 PM
Apperently your subdomain points you to your root directory /public_html/, and it should point you to /public_html/subdomaindir


You set it up wrong.



Whats up with redirects to that directory you mentioned? Why not have your main site in your main directory? And if you going to redirect your main site to that subdirectory do it with server redirects, that way it will work on all browsers and security settings.

clickk
01-29-2007, 10:05 PM
So the process I'm supposed to go through is first set up the subdomain, and then select "Setup Redirection" for the new subdomain that I just made, and point it to the proper directory? And then I have to wait a few hours because Note: Subdomains rely on the DNS system in order to function, which means that your DNS information must propagate throughout the different DNS servers on the Internet before your subdomain becomes fully active. This process on the average takes a few hours.
??

felgall
01-30-2007, 01:03 AM
When you set up a sub-domain it will automatically set itself up to direct to the folder within your root that has the same name as the subdomain part of the name.

When I set up members.felgall.com as a subdomain of felgall.com it automatically created the folder for the content of the subdomain to go in.

It is only if you want a subdomain to point somewhere other than the correspondingly named folder that you need to redirect it eg. I redirected mail.felgall.com to my horde webmail folder.

Also with a subdomain you don't need to wait for anything to propogate because the web assumes that xyz.abc.com can be found on the same server as www.abc.com and the only time there would be any propogation required is if you are relocating the subdomain in hosting that is on a different server to the main domain.

It is only with parked and add-on domains where the domain names are completely separate that you need to wait for them to propogate.