homepage Welcome to WebmasterWorld Guest from 184.73.104.82
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
301 Redirect Old phpBB SID's and ?=
strip everything and redirect back to home page
guyinoz



 
Msg#: 4627535 posted 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 :)

 

lucy24

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



 
Msg#: 4627535 posted 7:35 pm on Dec 3, 2013 (gmt 0)

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.

guyinoz



 
Msg#: 4627535 posted 9:55 am on Dec 5, 2013 (gmt 0)

Thanks Lucy24 :)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved