Page Index Toggle Pages: 1
Topic Tools
Normal Topic Perl redirection to another domain (Read 1,881 times)
The Boy
Full Member
***
Offline



Posts: 339
Location: UK
Re: Perl redirection to another domain
Reply #1 - Feb 23rd, 2013 at 2:50pm
Post Tools
I should add, this has taken my server load down from "worrying" to "idle" - I had a load index of 0.00 0.00 0.00 the other day when I checked. This server now just runs my SMF forum, with MySQL, and the YaBB redirect.
  
Back to top
WWW  
IP Logged
 
The Boy
Full Member
***
Offline



Posts: 339
Location: UK
Perl redirection to another domain
Feb 23rd, 2013 at 2:48pm
Post Tools
I've had to get my old archived YaBB off my live server, and onto another server hosted at Dreamhost.  This is mostly due to Baidu not obeying robots.txt, and hammering the old YaBB site until it ran out of resources Sad

Anyway, in case it proves useful to others...

YaBB.pl
Code (Perl)
Select All
#!/usr/bin/perl
use strict;
use warnings;
my $url = "http://oldsite.omegaowners.com/forum/YaBB.pl";
my $query_string = $ENV{'QUERY_STRING'};
print "Location: $url?$query_string\n\n";
 


(obviously, shove your own URL in, not mine!)

Although I do wonder if I should change that last line to:
Code (Perl)
Select All
print "Status: 302 MovednLocation: $url?$query_string\n\n"; 




Hope it may be of use to somebody.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top