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?
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.