I have a domain (in the firm A) that goes to an IP (in the firm B). When write my domain in a browser it shows then the IP instead of the domain.
How can i show always the domain instead of the IP?
I'm using apache as web server.
migrated from stackoverflow.com Sep 8 '10 at 20:02
This question came from our site for professional and enthusiast programmers.
If your site shows when requesting via IP, you can do url redirecting via
ServerName and ServerAlias
directives in your config. My guess is that ServerName contains the IP address and non-canonical urls, i.e. htp://domain.com/dirname are rewritten to htp://184.108.40.206/dirname which might be what is causing your rewrite.
Url sufficiently mucked up due to the fact that I can't seem to figure out how to turn off the markup.