RewriteCond %{QUERY_STRING} (^|&)t=([0-9]+)(&|$) [NC]
RewriteRule ^/forum/viewtopic\.php$ /threads/%2? [L,R=301,NC]
RewriteCond %{QUERY_STRING} f=(\d+)$ [NC]
RewriteRule ^/forum/viewforum\.php$ /forums/%1 [L,R=301,NC]
// $fileDir = '/home/username/www/forums';
// define('IMPORT_LOG_TABLE', 'import_log_x');
RewriteEngine on
RewriteCond %{QUERY_STRING} (^|&)t=([0-9]+)(&|$)
RewriteRule ^viewtopic\.php$ /forum/showthread.php?t=%2 [L,R=301,NC]
I think you need something like this in your .htaccess file:
Code:RewriteCond %{QUERY_STRING} (^|&)t=([0-9]+)(&|$) [NC] RewriteRule ^/forum/viewtopic\.php$ /threads/%2? [L,R=301,NC] RewriteCond %{QUERY_STRING} f=(\d+)$ [NC] RewriteRule ^/forum/viewforum\.php$ /forums/%1 [L,R=301,NC]
RewriteCond %{QUERY_STRING} (^|&)t=([0-9]+)(&|$) [NC]
RewriteRule ^viewtopic\.php$ /threads/%2? [L,R=301,NC]
RewriteCond %{QUERY_STRING} (^|&)p=([0-9]+)(&|$) [NC]
RewriteRule ^viewtopic\.php$ /posts/%2? [L,R=301,NC]
RewriteCond %{QUERY_STRING} f=(\d+)$ [NC]
RewriteRule ^viewforum\.php$ /forums/%1 [L,R=301,NC]
It retains the ID's, so the same threads / posts have the same ID in the different softwares. Basically, in viewtopic.php?f=yyy&t=xxx, yyy is the ID for the forum, xxx is the ID of the topic, a bit simplified.What does the "Retain content IDs" feature do?
We use essential cookies to make this site work, and optional cookies to enhance your experience.