miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /  
 

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

 
 
Page  Page 1 of 2:  1  2  Next »

Author simmering
Partaker
#1 | Posted: 13 Apr 2006 12:55 
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.

Author Team
8-)
#2 | Posted: 13 Apr 2006 13:32 
What kind of URLs you need to redirect and how it's related to miniBB?

Author simmering
Partaker
#3 | Posted: 13 Apr 2006 13:39 
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.

Author Team
8-)
#4 | Posted: 13 Apr 2006 13:48 
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.

Author simmering
Partaker
#5 | Posted: 14 Apr 2006 17:51 
Many thanks! I did the mod rewrite already. everything is working fine!

Author simmering
Partaker
#6 | Posted: 2 May 2006 17:00 
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. :(

Author tom322
Active Member
#7 | Posted: 2 May 2006 17:28 
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.

Author Team
8-)
#8 | Posted: 2 May 2006 20:35 
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.

Author simmering
Partaker
#9 | Posted: 2 May 2006 20:35 
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...

Author Team
8-)
#10 | Posted: 2 May 2006 20:37 
simmering
Analyze the logs. Visitors can decrease not only from search engines.

Author Paul
Lead Developer 
#11 | Posted: 3 May 2006 08:40 
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="12_1"; else $furl="12_3690_{$page}";

header("HTTP/1.1 301 Moved Permanently");
header("Location: https://www.minibb.com/forums/{$furl}.html");
exit;
}
/* --mod_rewrite redirect */

Author simmering
Partaker
#12 | Posted: 5 May 2006 07:42 
That was what i'm looking for...

Author Paul
Lead Developer 
#13 | Posted: 16 May 2006 07:08 
Notice: this also will work when you browse forums, choosing them from dropdown menu at the bottom of page.

Author Culture
Guest
#14 | Posted: 27 Aug 2009 14:03 
Paul
Hi Paul,

I found this forum interesting and I would like to prefrom a redirect 301 to my old urls.

I have about 20 pages (old urls) that need to be redirected, would you please advice me how to do that? Also you have mentioned the code above for redirect do you think I can use it, if so how and where can I place the code.

I really don't know anything about redirecting or web stuff?

Any help will really appreciated.

Regards
Mo

Author tom322
Active Member
#15 | Posted: 27 Aug 2009 19:57 
"Culture," there are many good guides how to do it and its quite simple. Check this: http://www.isitebuild.com/301-redirect.htm

Page  Page 1 of 2:  1  2  Next » 
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 mod rewrite and redirect with 301: redirect the old urls to the new ones
 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 forum rules; otherwise it could be locked or removed 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
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑