View previous topic :: View next topic |
Author |
Message |
RciX -
Joined: 21 Dec 2003 Posts: 7 Location: New Zealand
|
Posted: Mon Dec 22, 2003 5:09 pm Post subject: IP -> URL |
|
|
Hi People, i was wondering about that topic on IP to URL resolution...i have no idea how it works, where would i put this script, i've read that tutorial and i got nothin from it.. how do they enter you're url eg: random.url.com from typing it into the Address/Location Bar?
Code: | <?
//get domain entered in browser
$HOST = $_SERVER['HTTP_HOST'];
if ($HOST == "12.211.176.17") {
header("Location : /index.html");
exit;
}
else {
header("Location : /index2.html");
exit;
}
?> |
_________________ ------------
RciX - NDs |
|
Back to top |
|
 |
the knight -
Joined: 31 Dec 2003 Posts: 6 Location: France
|
Posted: Wed Dec 31, 2003 3:43 pm Post subject: |
|
|
My own opinion is that the string :if ($HOST == "12.211.176.17") { is purely formated to be your own IP , the IP of your server.
it should not work if your internet is based on dynamic ip ( that mean your IP change in a given time...)
To put a close look on your script .. it seems not to be what you think... |
|
Back to top |
 |
 |
|