I am locally developing a website via MAMP and rather than messing with the changing all of my links and etc later on I opened up etc/hosts and added this line 127.0.0.1 localhost mysite.com so that my site thinks it has the mysite.com domain name, this works great. However I can't access a part of my site within a subdomain etc sub.mysite.com routes to localhost. Is there any way to route localhost to mysite.com yet still keep sub.mysite.com accessible?

UPDATE: I just found out that my subdomain is redirecting to my domain. I'm gonna guess that it is virtually impossible to prevent localhost from routing to some specific directory ex. mysite.com/example/.

link|improve this question
That shouldn't happen; something else is screwed up. – womble Aug 27 '11 at 4:27
Your right, I just noticed that my subdomain is redirecting to my domain, please check the update to my post. Is there anything that can be done? – ThomasReggi Aug 27 '11 at 4:57
I'd say "probably not". Why would you be redirecting between subdomains anyway? – womble Aug 27 '11 at 5:40
feedback

1 Answer

In windows, I think if "domain.com" is mapped to localhost, it is independent from sub.domain.com. You need to specify every single subdomain in the hosts file for it to work.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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