Solved

Redirect

Posted on 1998-11-07
9
189 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

by:Rus
Comment Utility
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 8

Expert Comment

by:MaDdUCK
Comment Utility
whose comment helped you best?
0
 
LVL 5

Expert Comment

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


0
 

Author Comment

by:Rus
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
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 …
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now