MyBB Community Forums

Full Version: 301 redirect some URLs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to redirect [via .htaccess] all the URLs in my forum which will contain this,

mode=linear

Example URL:

forums/showthread.php?mode=linear&tid=800&pid=1901

I want to redirect all URLs that will have "mode=linear" in it to a 404 not found page. The reason is that this mode thing create duplication problem.

Can someone help?
What duplication problem does it create??
(2008-11-23, 02:16 PM)Matt_ Wrote: [ -> ]What duplication problem does it create??

In google webmaster tools, there is a big list of duplicate title list.

Please help Matt
Oh, I wouldn't worry about that, I have some errors there that say it's it's looking for forum-2.html and I haven't had URLs like that in weeks. I don't know why it happens but it shouldn't be a problem as long as your users don't get any errors.
(2008-11-23, 02:44 PM)Matt_ Wrote: [ -> ]Oh, I wouldn't worry about that, I have some errors there that say it's it's looking for forum-2.html and I haven't had URLs like that in weeks. I don't know why it happens but it shouldn't be a problem as long as your users don't get any errors.

but matt it is possible to do the redirect?

if you can show me how to do the redirect, that will be great.

I already removed the options that users have to view linear or other mode, now there are no URLs pointing to such links that contain mode but in the upgrade process, Google crawl these links.

In my previous version mybb forum, I also removed the option to view in mode, so there was no duplicate problem, but I want to find a permanent solution, that is, to redirect all the URLs which will contain mode=linear

please help
404 won't help you with google, what you want is probably 301 redirect.

you could probably write a .htaccess R=301 rule that removes a static part of the url like mode=linear.

my google seo plugin also does 301 redirects (and 404 error pages), although it's meant for redirecting showthread.php?tid=x to thread-x or vice versa. It would probably be possible to make it strip some options from the query string.

However Google should also be able to figure this out by itself. It claims to be able to in its SEO guide anyhow. I don't see this kind of issue in my test forum either (but it doesn't have many users or threads and it's modified with my own SEO and Google knows which URLs are preferred thanks to Sitemap).

I'll have a much bigger forum to test with starting in March 2009. If there's an issue with Google that I can reproduce, I'll look into fixing it then.

and I forgot a much simpler solution, you could make use of robots.txt to prevent google from indexing unwanted URLs.