Forum Moderators: phranque

Message Too Old, No Replies

Cobalt Raq 301

How do I do it?

         

Good_Vibes

4:58 pm on Sep 24, 2003 (gmt 0)

10+ Year Member



I am using a Cobalt Raq, and I want to set up a 301 permanent redirect.

How do I do that?

JasonD

6:26 pm on Sep 24, 2003 (gmt 0)

10+ Year Member



Presuming it is a single site on the Raq that you want to set up the redirect for then .htaccess can do the job for you in conjunction with some Perl.

Ther are a few dozen (minimum) ways to do this and this is just one.

make a .htacess file with the following in it.


DirectoryIndex index.cgi

and have index.cgi contain the following remembering to change the route to Perl on the first line and YOURNEWDOMAINORURL on the 3rd line and CHMOD 755

#!/usr/bin/perl
print "Status: HTTP/1.1 301 Moved Permanently\n";
print "Location: http://www.YOURNEWDOMAINORURL\n\n";

Jason D

closed

6:59 pm on Sep 24, 2003 (gmt 0)

10+ Year Member



Of course, if you have Apache on your RaQ, then a more efficient way would be to use the Redirect, RedirectMatch, or RedirectPermanent directive in httpd.conf.