MyBB Community Forums

Full Version: Auto redirect on 404 error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Before I upgraded to newest version, I used to have a seo plugin. All pages in Google for my site is now with the old links. How do I make it so that when the user get a 404 error, he gets directed to the main forum.

Ty in advance.
No you can't do that, except deactivate that plugin
One thing you can do to add a javascript of redirection to specific URL,
If you like this suggestion, then tell me I will give the redirect script to you...
I decided to install the old addon again Smile Sorry for the trubble but thought it was best solution.
Dunno which SEO plugin you used, but if it kept the IDs in the URLs, all you need to keep is the .htaccess rewrite rules, not the plugin itself. You could then use Google SEO Redirect to have these pages redirected to their current valid names.
sp froustuze , its your plugin features ??
Easy!
In the Cpanel of your hosting or in your FTP edit your 404 Page... thats all
(2009-04-12, 06:46 PM)alvarorojas4 Wrote: [ -> ]Easy!
In the Cpanel of your hosting or in your FTP edit your 404 Page... thats all

But how to redirect, as i said it requires javascript to redirect to the specific url

Step 1 - put this in your <head> tag

<META HTTP-EQUIV="REFRESH" CONTENT="10;URL=refresh2.html">

part 2 - the clock ... <SCRIPT LANGUAGE="JavaScript">



<!-- Begin
startday = new Date();
clockStart = startday.getTime();
function initStopwatch() { 
 var myTime = new Date(); 
var timeNow = myTime.getTime();  
var timeDiff = timeNow - clockStart; 
this.diffSecs = timeDiff/1000; 
return(this.diffSecs); 
} 
function getSecs() { 
var mySecs = initStopwatch(); 
var mySecs1 = ""+mySecs; 
mySecs1= mySecs1.substring(0,mySecs1.indexOf(".")) + " secs."; 
document.form1.timespent.value = mySecs1 
window.setTimeout('getSecs()',1000); 
}
// End -->
</SCRIPT>

part 3 ... <BODY onLoad="window.setTimeout('getSecs()',1)">

part 4 ... <!-- A1 --><CENTER>
<FORM NAME="form1">
<input type="text" value="" name="timespent" size=10>
</FORM>
</CENTER><!-- -->

Thats a redirect script Smile