By h00j


2012-05-11 22:58:18 8 Comments

I have moved to mybb to vanilla and want to redirect old threads to the new format, so the indexed threads on Google aren't lost.

The old format is

showthread.php?tid=3003

Whereas the new format is

index.php?p=/discussion/3003

How would I redirect this via .htaccess?

1 comments

@Eddie 2012-05-12 12:15:16

You will want to use a 301 redirect (permanently moved) so that google will update its indexes with the new URLS, as users are redirected.

RewriteEngine on
RewriteBase /
RewriteCond %{QUERY_STRING} tid=([0-9]*)$
RewriteRule showthread.php index.php?p=/discussion/%1 [L,R=301]

@Eddie 2012-05-12 12:17:04

Also, for your follow up, yes, you would update the rule above to just redirect to the "clean" url, and then use a silent rewruite to ivoke index.php...corz.org/serv/tricks/htaccess2.php?page=2#not-so‌​-simple

@h00j 2012-05-12 13:04:23

For some reason with this rewrite it redirects to mysite.com/home/mysite/public_html/index.php?p=/discussion/3‌​003

@Eddie 2012-05-12 17:16:29

add rewritebase /

Related Questions

Sponsored Content

2 Answered Questions

3 Answered Questions

[SOLVED] .htaccess RedirectMatch 301 issue

1 Answered Questions

[SOLVED] 404 Not Found Errors -> Redirect

  • 2012-04-16 09:08:57
  • h00j
  • 292 View
  • 1 Score
  • 1 Answer
  • Tags:   redirects 404

1 Answered Questions

1 Answered Questions

[SOLVED] Redirect multiple files using .htaccess

1 Answered Questions

1 Answered Questions

[SOLVED] Remove directory from Google SE results

3 Answered Questions

[SOLVED] Will googlebot index my index.php even with an htaccess redirect?

  • 2010-09-27 22:10:00
  • Wislow
  • 1191 View
  • 3 Score
  • 3 Answer
  • Tags:   seo htaccess

Sponsored Content