Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirection VIA Perl

Status
Not open for further replies.

mtorbin

Technical User
Nov 5, 2002
369
0
0
US
Hey all,

As you can probably tell, I've had a full day of development (thus all the questions...thanks for your help!)

I have a script I'm working on and I can't seem to find the answer anywhere. Here's a quick run down:

if (THIS CASE EXISTS) {

[SOMEHOW REDIRECT THE BROWSER TO 123.45.6.789]

}

else {
[DO SOME ALERT BOX THING]
}

It's that first half that I'm having the most trouble with. I can't seem to figure out (or find for that matter) what the exact directive is to accomplish this. Any suggestions?


- MT
 
[SOMEHOW REDIRECT THE BROWSER TO 123.45.6.789]

print "Content-Type text/html\n\n";
print &quot;<html><head><meta http-equiv=\&quot;refresh\&quot; content=\&quot;0; URL=http://123.45.6.255\&quot;></head><body>You're being redirected in 0 seconds</body></html>&quot;;

Should do it

BTW 123.45.6.789 is going to be fun to redirect to

--Paul

If you're using CGI.pm let us know, and it can be rewrittent o look a lot sweeter
 
LOL... Thanks. Yeah, that fake IP I just grabbed and made up. I know it has some inaccuracies to it. ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top