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

XF 1.3 vBSEO3.8.x to xF NGINX rewrites

Jake has been helping a bit...but we seem to have hit a wall.

The old urls with vBSEO were like this


(currently giving a 404)

However the new url looks like this

So we are keeping the ID of the url.

Jake suggested to use
location ~* ^/forums/.+\.html$ {
rewrite [^/]+/([0-9]+)-[^\.]+\.html$
/threads/$1/ last;
or the htaccess to nginx converter suggested
rewrite ^/forums/[^/]+/([0-9]+)-[^.]+.html$ /threads/$1/ permanent;

The suggested htaccess that seemed to work for Jake previously was
RewriteEngine On

RewriteRule ^forums/[^/]+/([0-9]+)-[^\.]+\.html$ /threads/$1/ [R=301,L]
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.