Solved

Redirect

Posted on 1998-11-07
9
193 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

775 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