miniBB Support Forums | 16 years on The Web
miniBB ® 


 | Begin | Register | Reply | Search | Statistics | File Bank | Manual |
The Other miniBB Support Forums / The Other /   

Ways to redirect old URLs when using Mode_Rewrite (SEO, 301 - Permanently removed)

Author matus
#1 | Posted: 30 Jul 2006 12:21 

When I started to use Mode_Rewrite I experienced drop in Google. I think (not sure) that drop in number of indexed pages was caused by the existence of the old and new URLs at the same time.

So far I have found two solutions to prevent this using "301"-Permanently removed (hope it will help):

1. Adding the code from this thread to the file bb_plugins.php

2. Adding 301s to .htaccess code offered in miniBB official manual... that might look like this after the modification:

RewriteEngine On
#RewriteBase /folder

#parameters for short URL
RewriteCond %{QUERY_STRING} ^action=userinfo&user=([0-9]+)$
RewriteRule ^index\.php$ user%1.html? [R=301,L]
RewriteCond %{QUERY_STRING} ^action=vtopic&forum=([0-9]+)$
RewriteRule ^index\.php$ %1_0.html? [R=301,L]
RewriteCond %{QUERY_STRING} ^action=vtopic&forum=([0-9]+)&page=([0-9]+)$
RewriteRule ^index\.php$ %1_%2.html? [R=301,L]
RewriteCond %{QUERY_STRING} ^action=vthread&forum=([0-9]+)&topic=([0-9]+)$
RewriteRule ^index\.php$ %1_%2_0.html? [R=301,L]
RewriteCond %{QUERY_STRING} ^action=vthread&forum=([0-9]+)&topic=([0-9]+)&page=([0-9]+)$
RewriteRule ^index\.php$ %1_%2_%3.html? [R=301,L]

#html secret addresses to old ones (pridano rw=1, to prevent cycling)
RewriteRule ^user([0-9]+)\.html$ index.php?action=userinfo&user=$1&rw=1 [L]
RewriteRule ^([0-9]+)_([0-9]+)\.html$ index.php?action=vtopic&forum=$1&page=$2&rw=1 [L]
RewriteRule ^([0-9]+)_([0-9]+)_([0-9]+)\.html$ index.php?action=vthread&forum=$1&topic=$2&page=$3&rw=1 [L]

I have not tested the solutions but I have applied the first one today. What do you thik about the .htaccess code? I have downloaded it from one Czech forum. I hope it works but I am affraid to apply it :( since programming is not my strength.

(My site with miniBB forum (slovak))

Author Paul
Lead Developer
#2 | Posted: 31 Jul 2006 08:23 
Do you mean - you have had OLD style URLs like ?action=vforum&forum=1, now switched to mod_rewrite style URLs like 1_0.html?

If so, you don't need additional programming for some kind of "moved headers" etc. The solution is already built in miniBB, and we ourselves here switched that manner some time ago.

The secret is: when you have mod_rewrite turned on, your "regular style" URLs will have "NOINDEX,NOFOLLOW" attribute for their pages. At the same time the same pages with new URLs will have "INDEX,FOLLOW" attribute. Crawler will browse through your forum pages, indexing all new-style URLs from scratch, but from time to time will also visit your old pages, and seeing NOINDEX attribute, will remove them from cache.

This 100% worked for our forums.

Author matus
#3 | Posted: 5 Aug 2006 13:21 
Thanks for reply, Paul. Ive checked on google "" and I see, your forum is indexed correctly.

But when I browse my site google somehow refuses to index new URLs. From time to time it indexes new URLs like 1_0.html but then suddenly all new URLs disapear in few days. So I have 150 pages indexed instead of 190 last week.

... so no success with miniBB yet, but I will chceck all my settings once again.

Author Paul
Lead Developer
#4 | Posted: 5 Aug 2006 14:29 
Of course, it will take time, until Google re-indexes all of your stuff again! In our case, it took about 3 months to complete. Google is not your neighbour server :-) It indexes billions sites. Everything you see on Google is its own process, and you can not control it... but trust me - you are on the right way!

Author matus
#5 | Posted: 5 Aug 2006 20:31 
I do not doubt miniBB forum - thats great anyway. But .htaccess does not work for me without adding "RewriteBase /forum" into the script and I do not know why, google still refuses new URL. Few days after successful indexing it removes new URLs from search. I have no idea why :(((

If you have any suggestion then help me, please. If I will find the cause Ill let you know.

Author tom322
Active Member
#6 | Posted: 6 Aug 2006 06:40 
matus, my personal advice, give it a month, not a few days - it's too little to see google's spidering/refreshing effects.

Author Paul
Lead Developer
#7 | Posted: 7 Aug 2006 09:26 
For sure, Google will remove your old pages first. .htaccess doesn't matter for Google in any way. Google sees what your URLs produce for public, it doesn't know about your server's configuration ;-)

And of course - it's a months-worth process.

Author matus
#8 | Posted: 27 Aug 2006 17:26 
tom322, Paul

Yeah !!! It works !!! I love miniBB :)

The advice that worked was to give it a month :)

Thank you all !!!

The Other miniBB Support Forums / The Other /
 Ways to redirect old URLs when using Mode_Rewrite (SEO, 301 - Permanently removed)
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message

Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.

Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.


miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.