There is a way to specify an ip and a host to redirect to a web?
I mean if i have a server in the ip 190.50.60.30, a virtualHost in this named domain1.com and i want to redirect from another web to this.
like:
<?php
header('location: 190.50.60.30') //but whit the host
?>
or:
javascript:location.href='190.50.60.30'
i know this should be done for a dns server, but i got a dinamic ip and "no-ip" take several minutes for update my addres, i have a free domain, a free server (this don't allow a lot of data transfer) and i want to redirect from this server to my computer because i have done a 'system' for update the ip of my computer in the free server
It's not possible. Your browser needs to send a Host
header, and there's no way to specify it from the Location
header, which is returned.
If it's just for your computer, two ways to do it are to use something like Firefox's Modify Headers to set the Host header, or to add an entry to your hosts file giving the IP. There's no way to do this for "everyone" though.
I also think you're asking if it's possible to redirect to an IP, but with something else in the address bar. In this case, no. Imagine the possibilities if any malicious site could redirect you to their own version of "Paypal"...