Solved

A really simple redirecting question.

Posted on 2000-04-16
4
166 Views
Last Modified: 2013-12-25
I'm excruciatingly new to the world of cgi (literally a few days), and up to now I can only use other peoples scripts on my site (i.e. I haven't looked into writing them yet!).
Anyway, if you wouldn't mind, I'd like someone to write me a script that makes the browser go to another url. The problem arises because I'm changing over to another host, and I know people are currently linking to the old address. The only two possible old addresses (that no longer work) are:
http://www.jokecity.webprovider.com/ubb/ubbcgi/Ultimate.cgi
and
http://www.jokecity.webprovider.com/ubb/ubbcgi/Ultimate.cgi?action=intro

Coincidently, these two different things have exactly the same effect!
I'd like a script written that I can call Ultimate.cgi, and place in this location that redirects the user to:
http://the-jokecity.virtualave.com/ubb/ubbcgi/Ultimate.cgi

So, I presume you understand the predicament I'm in, and I'll dish out the points for any speedy response that actually works!
(Just for reference, the path for perl is usr/local/bin/perl)
0
Comment
Question by:stesherlock
[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
4 Comments
 
LVL 1

Accepted Solution

by:
lambda earned 25 total points
ID: 2722233
#!/usr/local/bin/perl

print "Content-type: text/html\n";
$location="http://the-jokecity.virtualave.com/ubb/ubbcgi/Ultimate.cgi";
print "Location: $location\n\n";


This script will redirect user to http://the-jokecity.virtualave.com/ubb/ubbcgi/Ultimate.cgi 

£.
0
 
LVL 1

Expert Comment

by:lambda
ID: 2722262
Another option is giving in the head portion of the HTML,

<meta http-equiv=refresh content=0;url="http://the-jokecity.virtualave.com/ubb/ubbcgi/Ultimate.cgi">
0
 

Author Comment

by:stesherlock
ID: 2724828
Thanks mate! It was just what I was looking for. I'm sorry I asked you instead of just researching it myself, but like I said I'm new to cgi and I don't really have the time at the moment to research it!
If you know of any good, free tutorials I'd be greatly appreciative.
0
 
LVL 1

Expert Comment

by:lambda
ID: 2725285
You can visit the following sites...

http://www.cgi101.com/class/
http://www.irt.org

£.
0

Featured Post

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

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

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
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 …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

734 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