Redirecting using a CGI file?

Soldato
Joined
9 Nov 2003
Posts
9,515
Location
The Motor City
I have a working knowledge of CSS and HTML stuff, but never worked with CGI before. I have a dead database right now (thank you very much, SQL vulnerability), and I'd like to redirect hits to a webpage with a .cgi extension to another page until I get the DB sorted out.

In HTML, I would do it like this:

Code:
<html>
<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.facebook.com/#!/pages/MTA-Motorcycle-Touring-Association">
</html>
and name it index.htm

Currently all my links all over my site point to \board.cgi. Can I rename this file temporarily and put some code in it to have it route to FB? Does a browser even care what extension is used, as long as the page identifies itself within the file?
 
Yes swap the file for another CGI file:

See http://www.javascriptkit.com/howto/cgiredirect.shtml

I can't remember much but I think you will have to set the CHMOD permissions to execute on the new file (unless you upload a file with the exactly the same name, after copying the old one rather then re-naming the existing then uploading)
 
Back
Top Bottom