Here are different redirect rules for vBSEO you can use depending on the url structure.
Our forum has moved to a new domain on import (external service, so no import table), thus some of these rules come in handy when you are in the same situation. Place the rules in the htacces for your old domain then.
forum url ending with f65 (or other number)
RewriteRule ^f([0-9]+)/$ http:// yourdomain /forums/$1/ [R=301,L]
index7859.html (or other numbers in between) for forums
RewriteRule ^f([0-9]+)/index([\d]+).html http:// yourdomain /forums/$1/ [R=301,L]
Threads with and without / at the end
RewriteRule ^f[0-9]+/[^/]+-([0-9]+)/$ http:// yourdomain /threads/$1/ [R=301,L]
RewriteRule ^f[0-9]+/[^/]+-([0-9]+)$ http:// yourdomain /threads/$1/ [R=301,L]
index4758.html (or other numbers in between) for threads
RewriteRule [^/]+-([\d]+)/index([\d]+).html http:// yourdomain /threads/$1/ [R=301,L]
redirect index.php from old domain index.php to new
RewriteRule index\.php$ http:// yourdomain / [R=301,L]
redirect old domain to new domaim
RewriteRule ^/?$ http:// yourdomain / [R=301,L]
.php url depending on the query string (...=some numbers)
RewriteCond %{QUERY_STRING} f=([0-9]+)(&|$)
RewriteRule forumdisplay\.php$ http:// yourdomain /forums/%1? [R=301,L]
RewriteCond %{QUERY_STRING} p=([0-9]+)(&|$)
RewriteRule showthread\.php$ http:// yourdomain /threads/%1? [R=301,L]
RewriteCond %{QUERY_STRING} t=([0-9]+)(&|$)
RewriteRule showthread\.php$ http:// yourdomain /threads/%1? [R=301,L]
RewriteCond %{QUERY_STRING} p=([0-9]+)(&|$)
RewriteRule showpost\.php$ http:// yourdomain /threads/%1? [R=301,L]
RewriteCond %{QUERY_STRING} p=([0-9]+)(&|$)
RewriteRule showpost\.php$ http:// yourdomain /posts/%1? [R=301,L]
RewriteCond %{QUERY_STRING} threadid=([0-9]+)(&|$)
RewriteRule showthread\.php$ http:// yourdomain /threads/%1? [R=301,L]
RewriteCond %{QUERY_STRING} t=([0-9]+)(&|$)
RewriteRule showthread\.php$ http:// yourdomain /threads/%1? [R=301,L]
RewriteCond %{QUERY_STRING} p=([0-9]+)(&|$)
RewriteRule showthread\.php$ http:// yourdomain /threads/%1? [R=301,L]
RewriteCond %{QUERY_STRING} forumid=([0-9]+)(&|$)
RewriteRule forumdisplay\.php$ http:// yourdomain /forums/%1? [R=301,L]
RewriteCond %{QUERY_STRING} f=([0-9]+)(&|$)
RewriteRule forumdisplay\.php$ http:// yourdomain /forums/%1? [R=301,L]
RewriteCond %{QUERY_STRING} u=([0-9]+)(&|$)
RewriteRule member\.php$ http:// yourdomain /members/%1? [R=301,L]
RewriteCond %{QUERY_STRING} attachmentid=([0-9]+)(&|$)
RewriteRule attachment\.php$ http:// yourdomain /attachments/%1? [R=301,L]
RewriteCond %{QUERY_STRING} ppuser=([0-9]+)(&|$)
RewriteRule showgallery\.php$ http:// yourdomain /media/users/%1? [R=301,L]
RewriteCond %{QUERY_STRING} albumid=([0-9]+)(&|$)
RewriteRule album\.php$ http:// yourdomain /media/albums/%1? [R=301,L]
Our forum has moved to a new domain on import (external service, so no import table), thus some of these rules come in handy when you are in the same situation. Place the rules in the htacces for your old domain then.
forum url ending with f65 (or other number)
RewriteRule ^f([0-9]+)/$ http:// yourdomain /forums/$1/ [R=301,L]
index7859.html (or other numbers in between) for forums
RewriteRule ^f([0-9]+)/index([\d]+).html http:// yourdomain /forums/$1/ [R=301,L]
Threads with and without / at the end
RewriteRule ^f[0-9]+/[^/]+-([0-9]+)/$ http:// yourdomain /threads/$1/ [R=301,L]
RewriteRule ^f[0-9]+/[^/]+-([0-9]+)$ http:// yourdomain /threads/$1/ [R=301,L]
index4758.html (or other numbers in between) for threads
RewriteRule [^/]+-([\d]+)/index([\d]+).html http:// yourdomain /threads/$1/ [R=301,L]
redirect index.php from old domain index.php to new
RewriteRule index\.php$ http:// yourdomain / [R=301,L]
redirect old domain to new domaim
RewriteRule ^/?$ http:// yourdomain / [R=301,L]
.php url depending on the query string (...=some numbers)
RewriteCond %{QUERY_STRING} f=([0-9]+)(&|$)
RewriteRule forumdisplay\.php$ http:// yourdomain /forums/%1? [R=301,L]
RewriteCond %{QUERY_STRING} p=([0-9]+)(&|$)
RewriteRule showthread\.php$ http:// yourdomain /threads/%1? [R=301,L]
RewriteCond %{QUERY_STRING} t=([0-9]+)(&|$)
RewriteRule showthread\.php$ http:// yourdomain /threads/%1? [R=301,L]
RewriteCond %{QUERY_STRING} p=([0-9]+)(&|$)
RewriteRule showpost\.php$ http:// yourdomain /threads/%1? [R=301,L]
RewriteCond %{QUERY_STRING} p=([0-9]+)(&|$)
RewriteRule showpost\.php$ http:// yourdomain /posts/%1? [R=301,L]
RewriteCond %{QUERY_STRING} threadid=([0-9]+)(&|$)
RewriteRule showthread\.php$ http:// yourdomain /threads/%1? [R=301,L]
RewriteCond %{QUERY_STRING} t=([0-9]+)(&|$)
RewriteRule showthread\.php$ http:// yourdomain /threads/%1? [R=301,L]
RewriteCond %{QUERY_STRING} p=([0-9]+)(&|$)
RewriteRule showthread\.php$ http:// yourdomain /threads/%1? [R=301,L]
RewriteCond %{QUERY_STRING} forumid=([0-9]+)(&|$)
RewriteRule forumdisplay\.php$ http:// yourdomain /forums/%1? [R=301,L]
RewriteCond %{QUERY_STRING} f=([0-9]+)(&|$)
RewriteRule forumdisplay\.php$ http:// yourdomain /forums/%1? [R=301,L]
RewriteCond %{QUERY_STRING} u=([0-9]+)(&|$)
RewriteRule member\.php$ http:// yourdomain /members/%1? [R=301,L]
RewriteCond %{QUERY_STRING} attachmentid=([0-9]+)(&|$)
RewriteRule attachment\.php$ http:// yourdomain /attachments/%1? [R=301,L]
RewriteCond %{QUERY_STRING} ppuser=([0-9]+)(&|$)
RewriteRule showgallery\.php$ http:// yourdomain /media/users/%1? [R=301,L]
RewriteCond %{QUERY_STRING} albumid=([0-9]+)(&|$)
RewriteRule album\.php$ http:// yourdomain /media/albums/%1? [R=301,L]
Last edited: