Posted by: Red Barchetta Posted on: Dec 20th, 2014 at 4:35am
Thanks for the help with this. I needed it as I had moved my YaBB Forum to a new folder on my server. I had changed the Paths.pl so after hitting the old folder it would change to the new one, but I still see I have more entry page hits starting on the old folder than directly going to the new one. This will create a 5 second pause and inform them of the new URL, and then redirect them there.
Does the .httaccess redirect method support a message?
Posted by: Dandello Posted on: Dec 20th, 2014 at 1:30am
You've moved your forum and can't use a server (.htaccess) redirect.
Replace the contents of your old YaBB.pl file with:
Code (Perl)
#!/usr/bin/perl --
print "Content-type: text/html\n\n" or die 'cannot print line1';
print qq~
<!DOCTYPE html>
<html lang="en-us">
<head>
<title>YaBB Webmaster redirect</title>
<meta http-equiv="refresh" content="5;URL=http://mynewyabb/cgi-bin/yabb2/YaBB.pl" />
</head>
<body style="background-color:#ffffff">
<p style="text-align:center">The content you are looking for has moved. You will be redirected to the new location automatically in 5 seconds. Please bookmark the correct page at <a href="http://mynewyabb/cgi-bin/yabb2/YaBB.pl">http://mynewyabb/cgi-bin/yabb2/YaBB.pl</a>
</p>
</body>
</html>~ or die 'cannot print line2';
Since it's absolutely basic html you can style it however you want. It will automatically redirect to the new address. (Obviously you should point it to your new forum.)