I’m having a directory website with sub-pages for each city. Like for example
Newyork will have an address http://www.directory.com/newyork, LA will have http://www.directory.com/la
so i want to point the the domain newyorkdirectory.com to http://www.directory.com/newyork
and so for each sub sections… what are the options I have.. can I do this in my code? Is there any way to detect the domain from php and load the content accordingly?
If all i point all the domain’s to the site can i detect the incoming domain and refer them to a page? I totally have no idea on this.
Clarification:
when people goto the site through newyorkdirectory.com the page
http://www.directory.com/newyork/malls should be accessed through newyorkdirectory.com/malls
You mean you want all existing “newyorkdirectory.com” links of your website to point to “www.directory.com/newyork”? Or you want to point to “www.directory.com/newyork” when people try to go to “newyorkdirectory.com”?
Second case is impossible if you do not possess domain “newyorkdirectory.com”, else you can reroute using Apache .htaccess I think.