I couldn't locate any example of how to redirect friendly URLs managed by the Zoints SEO plugin for vBulletin so came up with my own configuration. I use Nginx so my location block looks like this:
#rewrite thread requests rewrite t([0-9]+)\.html.* /threads/$1 permanent; #rewrite forum requests rewrite f([0-9]+)\.html.* /forums/$1 permanent; # First attempt to serve request as file, then # as directory, then pass to index.php try_files $uri $uri/ /index.php?$uri&$args;
- Nginx sees request for old 'Zoints style' http://www.example.com/heffalumps-and-woozles-t6758.html
- First rewrite rule regular expression matches t6758.html with subgroup 6758 denoted by $1
- Subgroup used to form location /threads/6758
- Nginx issues HTTP 301 [permanent redirect] with location http://www.example.com/threads/6758
- XenForo issues 301 redirect to http://www.example.com/threads/heffalumps-and-woozles.6758/#post-21638
- User sees page
- You might have had Zoints configured differently so my pattern may not work
- Assumes a basic site set-up where forum is in root directory, no false positives, friendly URLs enabled etc.
- 2 redirects are being issued so there is a HTTP overhead for user and your server (unavoidable).
- 2 Regex rules are been run for every request to the server, something to be conscious of