PDA

View Full Version : Simple script you can help me make :)



programmer2k
March 7th, 2001, 03:40
I want a index.cgi
where if the user goes to index.cgi
it automatically redirects him to another site ex:
http://www.yourotherdomain.com

I made one
but I keep getting errors

anyone help?

Hellbound
March 7th, 2001, 07:36
Why don't you just use index.html and use a META redirect tag?

Not as fancy, but it works.

Gonzo
March 7th, 2001, 09:05
if you have PHP use this


<?php
Header ("Location: http://www.domain.com");
?>

Or use the META redirect tag like Hellbound said.


<meta http-equiv="refresh" content="1;url=http://www.server.com">


or you could even do it with a .htaccess file.

programmer2k
March 7th, 2001, 14:44
well
I don't like html

cgi seems more clean than html

razor
March 7th, 2001, 16:05
thats a stupid reason. the person doesnt see the code

programmer2k
March 7th, 2001, 18:18
anyways
I made one

keith
March 7th, 2001, 18:19
index.cgi should read:



#!/usr/bin/perl
print "Location: http://www.domain.com/whatever/page.html\n\n";