Welcome! Log In Create A New Profile

Advanced

Converting vBSEO to Xenforo (htaccess to NGINX)

Posted by Dildy 
Converting vBSEO to Xenforo (htaccess to NGINX)
March 31, 2014 09:50AM
Hello

I'm migrating from vBSEO + vBulletin 3.8.x to the new Xenforo.

The old urls with vBSEO were like this

http://www.domain.com/forums/taurus/146919-taurus-740-slim-showing-its-true-colors.html

(currently giving a 404)

However the new url looks like this
http://www.domain.com/threads/taurus-740-slim-showing-its-true-colors.146919/

So we are keeping the ID of the url.

Someone suggested to use
[quote]location ~* ^/forums/.+\.html$ {
rewrite [^/]+/([0-9]+)-[^\.]+\.html$
/threads/$1/ last;
} [/quote]
or
[quote]
rewrite ^/forums/[^/]+/([0-9]+)-[^.]+.html$ /threads/$1/ permanent;
[/quote]


The suggested htaccess that seemed to work
[quote]
RewriteEngine On

RewriteRule ^forums/[^/]+/([0-9]+)-[^\.]+\.html$ /threads/$1/ [R=301,L]
[/quote]
This doesn't quite work.

any help would be excellent.
I'm far from a nginx expert, or moderate. However, I can edit the conf and restart nginx pretty well.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 97
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready