XF 1.5 DBSEO URL rewrite

Sperber

Well-known member
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
 
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?
 
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.
 
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.
 
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.
 
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.

@Jake Bunce Please let me know the rules for Threads, Paginated Threads and Single Posts https://mysite.com/forumID/threadID.html
 
Top Bottom