Solved

Redirect

Posted on 1998-11-07
9
205 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

 

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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
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…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

632 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