Solved

Redirect

Posted on 1998-11-07
9
201 Views
Last Modified: 2013-12-25
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
0
Comment
Question by:Rus
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 1

Expert Comment

by:flivauda
ID: 1829472
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>
";






0
 
LVL 1

Expert Comment

by:flivauda
ID: 1829473
The meta line needs a > on it, it should read:

<META HTTP-EQUIV=\"Refresh\" CONTENT=\"$delay;URL=$myurl\">
0
 
LVL 8

Expert Comment

by:MaDdUCK
ID: 1829474
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).
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:Rus
ID: 1829475
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...?
0
 
LVL 8

Expert Comment

by:MaDdUCK
ID: 1829476
whose comment helped you best?
0
 
LVL 5

Expert Comment

by:aioudine
ID: 1829477
You my ask busy linda in "customer service area" to split points between experts


0
 

Author Comment

by:Rus
ID: 1829478
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.
0
 
LVL 7

Expert Comment

by:linda101698
ID: 1829479
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
0
 
LVL 1

Accepted Solution

by:
flivauda earned 120 total points
ID: 1829480
Sorry, here is my comment as an answer

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>
      ";
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question