Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to understand why when I type in a url address that is for a development server my browser changes it to an IP? In the top of my host files I have something like devserver.

I can access the base url just fine, but when I go to devserver/page/index.php it turns it into an address like such I think it has something to do with the host files or the fact that I use a VPN (Cisco IPSec) to access the development server. Could this be the reason why? I can't find any information on people having similar issues.

All my host files in /private/etc/

share|improve this question
This problem can't be related to the hosts file as the HTTP protocol does not know about domains and IP addresses until the browser tells it the domain name as the second line of an HTTP/1.1 request. – davidgo Feb 23 '13 at 8:06

Your development server (or the PHP script) is changing the URL while routing/redirecting your request. Look through your PHP code or .htaccess file (or equivalent configuration file) to verify if the server IP address is hard-coded into any variable or URL string.

share|improve this answer
It might also be hardcoded in <Host> or <VirtualHost> settings of Apache. – Arjan Feb 23 '13 at 8:21
Everything works great from my Windows work computer just my Mac is causing an issue remotely. If the IP was hardcoded wouldn't all computers that are trying to access it change the URL to the IP? – dnelson Feb 23 '13 at 19:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .