Solved

A really simple redirecting question.

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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

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…
This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

730 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