Forum Moderators: coopster & phranque

Message Too Old, No Replies

Mass Redirection

         

wonderboy

5:24 pm on Dec 21, 2003 (gmt 0)

10+ Year Member



Hi all, I think this is the right forum to ask this...

I am in the process of changing domain and would like to redirect all traffic visiting any page 'below' the folder:

[mysite.com...]

to [mynewsite.com...]

Anyone know the best way to do this? I don't want to have to put redirection on every page, so I figured you people would know a much simpler way!

W.

Damian

9:41 am on Dec 22, 2003 (gmt 0)

10+ Year Member



On Apache you could do it using the Module mod_alias Redirect [httpd.apache.org] or RedirectMatch [httpd.apache.org] directives.

moltar

3:38 am on Dec 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you insist on doing it through perl then you can do it the following way:

1) Redirect all 404 requests to the perl script
2) In perl script you can redirect to another domain:
3) Delete all the files

[perl]print 'Location: [YOUR-NEW-DOMAIN.com'.$ENV{'REQUEST_URI'}."\n\n";[...]

vasiokla

6:58 pm on Dec 26, 2003 (gmt 0)

10+ Year Member



You can use Apache .htaccess feature, i think it's best way to solve your problem.