Resource icon

Unmaintained Nginx rewrite code for phpBB 3.0.x to XF with SEO urls. 0.2

No permission to download
Compatible XF 1.x versions
  1. 1.2
Additional requirements
nginx 1.2.1
License
WTFPL
Changelog:
0.2
  • Updated rewrites to include p= parameter.
0.1
  • Initial post

This will only work if you imported to XF from phpBB with the same content ids and XF SEO-optimized urls are turned on. It is a simple rewrite rule that redirects the user from viewtopic.php to threads.

If you have a non-default XF URL, you will need to edit accordingly. Replace /forum/ with whatever path you specified.

In your server block, place these rewrite rules.
Code:
        if ( $arg_p ) {
                rewrite ^\/forum\/viewtopic\.php /forum/posts/$arg_p/? permanent;
        }
        if ( $arg_t ) {
                rewrite ^\/forum\/viewtopic\.php /forum/threads/$arg_t/? permanent;
        }
        rewrite ^\/forum\/viewforum\.php /forum/forums/$arg_f/? permanent;

Ex:
Code:
/forum/viewtopic.php?t=100 will 301-redirect to /forum/threads/100/
/forum/viewforum.php?f=2 will 301-redirect to /forum/forums/2/
Author
Anarchy Angel
Downloads
68
Views
1,811
First release
Last update

Ratings

5.00 star(s) 1 ratings

Latest reviews

Thank yoi! work it!
Спасибо.
Top Bottom