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

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

rewrite rules for default phpBB urls to XF SEO urls.

  1. Anarchy Angel
    Compatible XF Versions:
    • 1.2
    Additional Requirements:
    nginx 1.2.1
    License:
    WTFPL
    Changelog:
    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/

Recent Reviews

  1. yousite
    yousite
    5/5,
    Version: 0.1
    Thank yoi! work it!
    Спасибо.