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.
Javi
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.
Javi
If your site shows when requesting via IP, you can do url redirecting via mod_rewrite
. If that's not the case, which means the host apache configuration has multiple sites hosted on the same IP, you can't do this, because this won't be your own IP, but will be shared among all domains on the server
Check
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://1.2.3.4/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.