Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Redirecting YaBB (Read 1666 times)
Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 1759
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Re: Redirecting YaBB
Reply #2 - Dec 20th, 2014 at 3:29pm
Print Post  
Red Barchetta wrote on Dec 20th, 2014 at 4:35am:
Does the .httaccess redirect method support a message? 
                   

No - it just sends the browser to the new place with '301' (permanently moved) flag.

For .htaccess
Code
Select All
RewriteEngine on

RewriteCond %{HTTP_HOST} ^testbed\.dandello\.net$
RewriteRule ^/?$ "http\:\/\/www\.yabbforumsoftware\.com" [R=301,L] 


The above is from the redirect from a subdomain on dandello.net to here when I moved this site to its domain.
Also see: http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Red Barchetta
New Member
*
Offline



Posts: 46
Location: Miami, FL. USA
Joined: Oct 4th, 2014
Gender: Male
Re: Redirecting YaBB
Reply #1 - Dec 20th, 2014 at 4:35am
Print Post  
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?
  

Florida Classics and Muscle Car Automotive Forum Administrator
Back to top
WWW  
IP Logged
 
Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 1759
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Redirecting YaBB
Dec 20th, 2014 at 1:30am
Print Post  
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)
Select All
#!/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.)
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint