Solved

A really simple redirecting question.

Posted on 2000-04-16
4
163 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
  • 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

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

Suggested Solutions

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…
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…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

816 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

10 Experts available now in Live!

Get 1:1 Help Now