Welcome to WebmasterWorld Guest from 54.146.171.44

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

301 Redirect Old phpBB SID's and ?=

strip everything and redirect back to home page

   
5:35 pm on Dec 3, 2013 (gmt 0)



Hi,

A few years back I had a static html site and was also running a phpBB forum, which was using SID's etc etc. I've since trashed the forum and the main site is now using Wordpress.

While I have a redirect from the forum folder /games-forum/ back to the example.com GWT is still reporting on 404 errors from old SID's and ?=

EG - there are heaps of these ?p=(all with different number)

example.com/games-forum/viewtopic.php?p=15&sid=e7791316cdd79a82f55edb32d8fdb4f6

Only getting 404 errors on viewtopic.php?p=
example.com/games-forum/viewtopic.php?p=4

I've just about pulled all my hair out trying to get these damn things to redirect back to the home page (example.com) but with no success. Could someone please help and show me what I need to add to the htaccess to get these redirected?

Thanks :)
7:35 pm on Dec 3, 2013 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



redirect back to the home page ... but with no success

Good, because google and your users both hate this approach ;)

Instead, grab any request for /games-forum/ and serve a 410 response. Combine this with a nice custom 410 page that says something like "We don't have the forum any more, but here are some other areas you might find useful".

This has to be done with mod_rewrite.* So if you have any existing redirects using mod_alias (Redirect by that name), convert them to mod_rewrite format. If there are lots of them, sneak a look at the adjoining thread where I've just pasted in a set of global replaces you can run on your htaccess file.


* It could theoretically be done in mod_alias using RedirectMatch. But you mentioned WordPress, which means you've already got mod_rewrite.
9:55 am on Dec 5, 2013 (gmt 0)



Thanks Lucy24 :)