Get exclusive CAP network offers from top brands

View CAP Offers

Old phpBB (forum trashed) – old session ID’s wont redirect

You have affiliate marketing questions. CAP has answers!Category: Website Design and DevelopmentOld phpBB (forum trashed) – old session ID’s wont redirect
AussieDave asked 4 years ago
Hi,

I’ve tried everything from .htacess redirect 301 to other tricks but nothing works.
I have about 30 odd links which Google webmaster tools keep giving a 404 error warnings on and I need to redirect them back to the home page.

xxxhttp://www.mydomain.com/games-forum/viewforum.php?f=7&mark=topics&sid=d3f326d165a46e91547913ae3baaf2ca

Can some please show me how I can get the above plus similar links to do a permanent 301 to the home page please?

Cheers

Dave

16 Answers
luminous88 answered 4 years ago
is it in a redirect loop or just going to error pages?

rmeeuwsen answered 4 years ago
I know this is not what you want to do, but I just use a generic htacess line for all unexplained 404 errors

ErrorDocument 404 http://gamingonlinefree.com/

(in fact, I have lots of sites and send all 404’s to one favorite)

allfreechips answered 4 years ago
Code:
re”>RewriteCond %{HTTP_HOST} ^[url]www.site.com/games-forum/[/url]
RewriteRule (.*) [url]http://www.site.com/[/url] [R=301,L]

try this one…
if it doesnt work ill play on my server till i get it

AussieDave answered 4 years ago
I tried this and it worked on some of the URL’s contained within “games-forum” folder and recursively down from that, except those with sid’s <span title=” title=”” class=”bbcode_smiley” />

RewriteEngine on
RewriteCond %{REQUEST_URI} ^/games-forum/
RewriteRule (.*) http://www.mydomain.net.au [R=301,L]
[/CODE]

think I’ll go chase this up on a forum which specifically deals with this stuff. Thanks for your help [COLOR=#0000ff]allfreechips[/COLOR] and everyone else too

Cheers

Dave[CODE]
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/games-forum/
RewriteRule (.*) http://www.mydomain.net.au [R=301,L]
[/CODE]

think I’ll go chase this up on a forum which specifically deals with this stuff. Thanks for your help allfreechips and everyone else too <span title=” title=”” class=”bbcode_smiley” />

Cheers

Dave

AussieDave answered 4 years ago
Thought I’d update just in case anyone else finds themselves having drama figuring out a working 301 redirect on SID variables.

I gave up trying to do this with htaccess. I contacted my server management guys and was given the following small piece of php code which I added to the first line of my header (WP).

[PHP]

if($_GET != “” || $_GET!= “” ){

header(“Location:http://www.mydomain.com&#8221;);

}

[/PHP]

It checks for any file call which contains “p” then variables (in my case the old phpbb session ID) and serves the home page, You could do this for any url if needed.

Cheers

Dave

Arjun answered 4 years ago
Thanks for posting that up Dave.