Link to home
Start Free TrialLog in
Avatar of Rus
Rus

asked on

Redirect

I am starting a small free home page service. For this I need a script that redirects a visitor to the category (directory) in which my member has stored his pages. The "pages like mine" option on the pages of members on Geocities.Or "Area HQ" on Fortune City.

Can anyone help me with this?
Thanks
Avatar of flivauda
flivauda

Here is some perl to do it.  Set the $myurl variable to which ever page you want to redirect them to

-----cut below here----------------------
#!/usr/local/bin/perl
$delay = 1;
$myurl = "http://www.collegestudent.com";

print "Content-type: text/html\n\n

<html>
<META HTTP-EQUIV=\"Refresh\" CONTENT=\"$delay;URL=$myurl\"
</html>
";






The meta line needs a > on it, it should read:

<META HTTP-EQUIV=\"Refresh\" CONTENT=\"$delay;URL=$myurl\">
Instead, when you are using CGI, it is usually better to output a location header:

-----cut below here----------------------
#!/usr/local/bin/perl
$myurl = "http://www.collegestudent.com";

print "Location: ".$myurl."\n\r\n\r";

-----------------------------------------

this is a much cleaner approach for CGI because the proposed meta tag does not work on some browsers like LYNX (or only in an ugly manner).
Avatar of Rus

ASKER

Thanks for your comments, they where very helpful. I am not sure what the procedure is when no one "proposes" an answer. Do I delete my question or...?
whose comment helped you best?
You my ask busy linda in "customer service area" to split points between experts


Avatar of Rus

ASKER

Both questions were useful and I haven't tested enough to find out what is the best solution. So I have followed aioudine's advice, and contacted Linda to split the points.
flivauda,
Please post an answer to this question so Rus can grade your answer. I'll post a question for MaDdUCK to award him points for his cooperation on this question.

Linda Gardner
Customer Service @ Experts Exchange
ASKER CERTIFIED SOLUTION
Avatar of flivauda
flivauda

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial