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 |
Custom Tutorials and Modifications miniBB Community Forum / Custom Tutorials and Modifications /

mod rewrite and redirect with 301: redirect the old urls to the new ones

 
simmering
Forums Member
#1 | Posted: 13 Apr 2006 12:55
Reply 
I really like the posibility to make a mod rewrite, but my site is well indexed by google, so i need to redirect the old urls to the new ones. is there an easy way to fix this with htaccess and 301-pages or should i implement every page in htacces. probably you'll know a shorter solution.
Team
8-)
#2 | Posted: 13 Apr 2006 13:32
Reply 
What kind of URLs you need to redirect and how it's related to miniBB?
simmering
Forums Member
#3 | Posted: 13 Apr 2006 13:39
Reply 
the urls which are indexed are the dynamic ones which are created normally in this forum, but if i use mod rewrite you'll get other (simplified) URLs, which are not known by google and other searchengines. I dont want to loose my high rankings at google for some pages, so therefor i want to create a 301 htaccess redirection.
Team
8-)
#4 | Posted: 13 Apr 2006 13:48 | Edited by: Team
Reply 
You will not lose your rankings any way. This is the same situation we have had on our forums previously, when we have had both dynamic pages and mod_rewritten. The only thing you need to know:

- if you have an URL like index.php?action=vthread&forum=2&topic=3690 (this thread), this page is shown, but not indexed, 'cause there are NOINDEX, NOFOLLOW tags.

- if your URL is like 2_3960_0.html (mod_rewritten), it's both shown and indexed.

So, when you have turned mod_rewrite on:

- your old-type URLs will be available for some time, but as soon Google re-visits them, as soon it will delete them from his cache;

- your new-type URLs will be indexed by Google from scratch.

We don't think some redirects are necessary. This is the same situation happened to us months ago.
simmering
Forums Member
#5 | Posted: 14 Apr 2006 17:51
Reply 
Many thanks! I did the mod rewrite already. everything is working fine!
simmering
Forums Member
#6 | Posted: 2 May 2006 17:00
Reply 
i did the mod rewrite a few weeks ago and now my number of visitors decreased a lot. how long did it take you guys to get back to the old number of visitors?
i asked around and lots of people disagree with you about not planned an mod rewrite with also a redirection (301)
i'm a little bit sad, because i had about 1500-1800 visitors a day, now it is gone down to 800-1000. :(
tom322
Forums Member
#7 | Posted: 2 May 2006 17:28
Reply 
It may take a couple of months or so for google to recognize the new URLs.

i'm a little bit sad, because i had about 1500-1800 visitors a day, now it is gone down to 800-1000. :(
I don't know your site but the decrease of visitors may be related to seasonal highs and downs. In Spring time there are reasonably less people online than in Winter.
Team
8-)
#8 | Posted: 2 May 2006 20:35
Reply 
simmering
Take a look at the log of the visits, and you'll probably discover, that visits from search engines are not changed a lot. Hopefully like that... we agree to the tom322 - currently, it's the period where people are not online, but near the sea, forest or... you know :-)

Anyway, we still don't see any proofs that our method is not working. If it worked on our site (yes, it takes about a couple of months for Google to re-index it again and eat all pages), it should work elsewhere.

i asked around and lots of people disagree with you about not planned an mod rewrite with also a redirection (301) - ask these people how they can prove that.
simmering
Forums Member
#9 | Posted: 2 May 2006 20:35
Reply 
i agree with you there are external influences, but i saw the numbers of visitors decreasing much after i did the mod rewrite. But i'm patient...
Team
8-)
#10 | Posted: 2 May 2006 20:37
Reply 
simmering
Analyze the logs. Visitors can decrease not only from search engines.
Paul
CEO
#11 | Posted: 3 May 2006 08:40 | Edited by: Paul
Reply 
This little code actually will redirect from old URL format to new format (mod_rewrite). Try to paste it in bb_plugins.php, in any place (at the top, for example):

/* mod_rewrite redirect if visiting old URLs */
if(($action=='vtopic' or $action=='vthread') and !isset($_GET['mdrw'])){

if($action=='vtopic') $furl="{$forum}_{$page}"; else $furl="{$forum}_{$topic}_{$page}";

header("HTTP/1.1 301 Moved Permanently");
header("Location: {$main_url}/{$furl}.html");
exit;
}
/* --mod_rewrite redirect */
simmering
Forums Member
#12 | Posted: 5 May 2006 07:42
Reply 
That was what i'm looking for...
Paul
CEO
#13 | Posted: 16 May 2006 07:08
Reply 
Notice: this also will work when you browse forums, choosing them from dropdown menu at the bottom of page.
 
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 - 20
Members - 0
Most users ever online: 191 [24 Dec 2007 14:33]
Guests - 191 / Members - 0

Forums are powered by miniBB®