Click to See Complete Forum and Search --> : redirection script


brandan
11-26-2004, 02:14 AM
i host a website from my computer, and bind would be too much of a hastle to setup with my dynamic ip (especially considering that i use windows xp). i was trying to think of an easy dynamic dns service, when i decided that it would be easiest and cheapest just to use my isp webspace to redirect to my personal server. i can just update a file every time my ip changes and i'm set until it changes again. i could probably even write a script to automate that, but i'm not too worried about it.

the one major problem i had was that i could only use meta refresh to refresh one specific page, but my site is journalesque in nature, and i wanted to be able to link to very dynamic extensions of, say, index.php. the problem with this is that browsers normally do not relay referer information on meta refresh, because it is just a refresh, and not a reference, so i had to switch to a tiny, one line javascript (it still bugs me, but it's small and loads quickly).

so basically now i can type http://members.cox.net/brandanglendenning/?journal-id=1 and i will be redirected to http://myipatthetime/index.php?journal-id=1. i also added a small bit to the script that would allow links to ?download= to allow downloading of specific files in the root directory, and that's about as far as i want to carry this script.

please take a look over it and tell me what you think. it is, in reality, the first script i've ever fully created without referencing material other than the functions list on php.net. thanks

http://members.cox.net/brandanglendenning/?download=redirect.rar

highphilosopher
01-07-2005, 10:09 PM
check out noip.com
really simple to use to get a domain