minibb®
Fight the automated spam - protect your miniBB-forums,
getting the Captcha addon! Click here to read more.
Captcha Addon for miniBB
Community Forum
 | Forums | File Bank | Sign Up | Reply | Search | Statistics | Manual |
Other miniBB Community Forum / Other /

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

 
matus
Guest
#1 | Posted: 30 Jul 2006 12:21
Reply 
Hi,

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))
Paul
CEO
#2 | Posted: 31 Jul 2006 08:23
Reply 
matus
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.
matus
Guest
#3 | Posted: 5 Aug 2006 13:21
Reply 
Thanks for reply, Paul. Ive checked on google "site:minibb.com" and I see, your forum is indexed correctly.

But when I browse my site site:hotlink.sk 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.
Paul
CEO
#4 | Posted: 5 Aug 2006 14:29
Reply 
matus
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!
matus
Guest
#5 | Posted: 5 Aug 2006 20:31
Reply 
Paul
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.
tom322
Forums Member
#6 | Posted: 6 Aug 2006 06:40
Reply 
matus, my personal advice, give it a month, not a few days - it's too little to see google's spidering/refreshing effects.
Paul
CEO
#7 | Posted: 7 Aug 2006 09:26
Reply 
matus
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.
matus
Guest
#8 | Posted: 27 Aug 2006 17:26
Reply 
tom322, Paul

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

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

Thank you all !!!
 
Your reply
Bold Style  Italic Style  Image Link  URL Link 


» Username  » Password 
You are welcome to post anonymously by entering a nickname with no password (if that nickname has not been taken by another member) or by leaving both fields empty. If you have a forums membership account, you can also sign in from this page without posting a message, or sign in and post at once.

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

 
Online now: Guests - 21
Members - 0
Most users ever online: 191 [24 Dec 2007 14:33]
Guests - 191 / Members - 0

Forums are powered by miniBB®