- Compatible XF 1.x 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.
Ex:
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/