Mobile app version of vmapp.org
Login or Join
Barnes591

: .htaccess Redirect Old Threads 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

@Barnes591

Posted in: #Htaccess #Redirects

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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Barnes591

1 Comments

Sorted by latest first Latest Oldest Best

 

@Vandalay111

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]

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme