XF 1.4 rewrite rule for vbseo to xf redirect

aussie

Member
ok folks, I am on the home stretch after importing over 1 million posts from vb to xf.:) The import script and functionality is great - very impressed with the entire XenForo package to say the least!(y) (y)

However, all I need now is for one of you htaccess gurus to correct a rewrite rule for me. I will add the rule to the top of my existing vb htaccess.

Code:
RewriteRule ^[^/]+/([0-9]+)-[^\.]+\.html$ /forums/threads/$1/ [R=301,L]

(It didn't work when I tried it)

old - http://www.mydomain.net/vbulletin/open-discussions/99167-rebuilding-taylor-float.html

new - http://www.mydomain.net/forums/threads/rebuilding-a-taylor-float.99167/

I have tried the redirect xf scripts and associated instructions without success but I am sure the correct rewrite rule will do the job.

Any help would be much appreciated please.

cheers
 
Last edited:
You may need a "RewriteEngine on" rule first.

However, we really need to see you have the rewrite rule in place and test it out to give any recommendations.

I will add the rule to the top of my existing vb htaccess.
Note that this isn't the way you would normally do. If you're redirecting from another directory, you would have a .htaccess that covers just the rules you need. You should probably try it with this approach such that you can rename the directories as necessary to allow the redirects to work.

You may also want to to use the redirection scripts to help catch the "standard" URLs.
 
for people finding themselves in the same predicament when time is the utmost priority here is the code to add to the top of your vb htaccess:

Code:
RewriteEngine On

RewriteRule ^(.*)/([0-9]+)-([^\.]+)\.html$ http://www.domain_name.com/forums/threads/$3\.$2/

[L,R=301]

worked like a charm. (y)

m i s s i o n c o m p l e t e !:D
 
Last edited:
Back
Top Bottom