Resource icon

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

No permission to download
Anarchy Angel submitted a new resource:

Nginx rewrite code for phpBB 3.0.x to XF with SEO urls. - rewrite rules for default phpBB urls to XF SEO urls.

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:
        rewrite ^\/forum\/viewtopic\.php /forum/threads/$arg_t/? permanent;
        rewrite...

Read more about this resource...
 
Thank you. I extended your rules a little bit for index, profiles, ucp and gallery.

NGINX:
location ~ /forum/ {
         if ( $arg_p ) {
                rewrite ^\/forum\/viewtopic\.php /posts/$arg_p/? permanent;
        }
        if ( $arg_t ) {
                rewrite ^\/forum\/viewtopic\.php /threads/$arg_t/? permanent;
        }
        if ( $arg_u ) {
                rewrite ^\/forum\/memberlist.php /members/$arg_u/? permanent;
        }
        rewrite ^\/forum\/viewforum\.php /forums/$arg_f/? permanent;
        rewrite ^\/forum\/gallery\/image_page\.php /media/$arg_image_id/? permanent;
        rewrite ^\/forum\/gallery\/image\.php /media/$arg_image_id/full? permanent;
        rewrite ^\/forum\/gallery\/album\.php /media/categories/$arg_album_id/? permanent;
        rewrite ^\/forum\/search.php /search/? permanent;
        rewrite ^\/forum\/memberlist.php /members/? permanent;
        rewrite ^\/forum\/ucp.php /account/? permanent;
        rewrite ^\/forum\/portal.php /? permanent;
        rewrite ^\/forum\/index.php /? permanent;
    }
 
Back
Top Bottom