XF 1.5 Rewrite rules for migration

Hey guys Im a little confused on how to use proper rewrite rules.

As you can see I kept the IDs, so Im planning to redirect :

from this VB URL:

to this xenforo URL:

from this VB URL:

to this xenforo URL:

From this VB URL:

to this xenforo URL:

Are these rewrite rules correct?

RewriteEngine On

RewriteRule ^/forum\.php$ /forums/ [R=301,L]

RewriteRule ^/forumdisplay\.php/([0-9]+)-.*$ /forums/$1/ [R=301,L]

RewriteRule ^/member\.php/([0-9]+)-.*$ /members/$1/ [R=301,L]

RewriteRule ^/showthread\.php/([0-9]+)-.*$ /threads/$1/ [R=301,L]

Thanks for the help!
As far as I understand I only need to add rewrite rules because I have the same IDs, according to this post: https://xenforo.com/community/threads/vbulletin-4-x-url-redirection.26935/page-3#post-625763

Im sorry, Am I missing something ?

In case that I install the redirection scripts, I understand that I need to install them in the old vb folder, for example:

After the installation has finished, can I erase the whole home/public_html/vb_forum folder and the database associated with vb?

Thanks for the help.
Last edited:
Yes, rewrites could work too since the ids are the same. But since your vB URLs are straight PHP links it is easier to just upload the PHP redirect scripts. To use those scripts your old vB folder needs to remain, but you can delete the vB files and leave only the redirect scripts. The vB database can also be removed.
Actually I have too many folders and files in the old VB folder , (more than 10Gb) so I think that I wouldn't know exactly what VB files I need to delete to save disk space and make the redirection scripts work properly at the same time.
So should I delete every single folder and file after the installation but the redirect scripts ? I'm confused and I don't want to have any problems after the migration.

Also if I want to use the rewrite rules , can I use these lines or the ones that I posted above?

RewriteCond %{QUERY_STRING} ^t=([\d]+)
RewriteRule ^forumdisplay\.php /forums/%1/? [NC,L,R=301]
RewriteRule ^showthread\.php /threads/%1/? [NC,L,R=301]
RewriteRule ^member\.php /members/%1/? [NC,L,R=301]
RewriteRule ^forum\.php /forums/%1/? [NC,L,R=301]

Thank you very much for the help!
Last edited:
To be clear, no old files or data are needed for the redirection scripts to work. You just need to drop them into the old location and (if necessary) adjust 301config.php to point to your XenForo files. They use only the XenForo database.
Top Bottom