• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 DBSEO URL rewrite

Sperber

Active member
#1
Hey there,

we´re just about to launch our forums and imported vBulletin 4 into xf. Now comes the part where the url redirects come into the game and that won´t work atm. I don´t understand url rewriting and hope that may be someone who is more capable of could gimme a helping hand on this.

Our vb URL structure was:
Threads: domain.name/[ID]-stripped-thread-titel.html
Categories: domain.name/category-name/
Forums: domain.name/forums/

Would be really glad if someone could help me out here.
Thanks,
Sperber
 

Sperber

Active member
#3
Hello Mouth,

already seen this one but as far as I understand it by description, this mod only is for standard or vbSEOed Urls - not for the ones DBSEO has generated. Or am I wrong?
 

Jake Bunce

XenForo moderator
Staff member
#5
Hey there,

we´re just about to launch our forums and imported vBulletin 4 into xf. Now comes the part where the url redirects come into the game and that won´t work atm. I don´t understand url rewriting and hope that may be someone who is more capable of could gimme a helping hand on this.

Our vb URL structure was:
Threads: domain.name/[ID]-stripped-thread-titel.html
Categories: domain.name/category-name/
Forums: domain.name/forums/

Would be really glad if someone could help me out here.
Thanks,
Sperber
Without ids the categories and forums will require extra effort. But the threads are easy.

Add these rules to the top of the .htaccess file in your web root:

Code:
RewriteEngine On

RewriteRule ^([0-9]+)-[^\./]+\.html$ /threads/$1/ [R=301,L]
This assumes that the ids are the same and XF is installed in the web root where vB was.
 

Sperber

Active member
#6
Hi @Jake Bunce ,

great news thanks. But unfortunal I´ve given incorrect settings of the rewrite-structure. Sorry, my bad.
The thread links are indeed domain.name/forumnamewithoutID/[ID]-thread-title.html .

Someone here told me that would be absolutly doable, but requires a rule for each forum. Would you mind to show me how I can do this with an example rule?

Thanks again,
Sperber.
 

Jake Bunce

XenForo moderator
Staff member
#7
Add these rules to the top of the .htaccess file in your web root:

Code:
RewriteEngine On

RewriteRule ^[^/]+/([0-9]+)-[^\./]+\.html$ /threads/$1/ [R=301,L]
That should handle all such URLs no matter what the forum slug is.