28 Mar 2011, 1:40pm

leave a comment

mod_rewrite for moving a phpBB Forum

Recently I split off 3 forums from an old site and created them fresh on the new site (pretty easy to do, just dupe the DB and nuke the ones you don’t need).

Here’s the mod_rewrite I used to redirect the links for *just* those 3 forums to the new site:

 

In the .htaccess file of the forum’s root directory:


RewriteEngine on

RewriteCond %{QUERY_STRING} f=(26|27|29)
RewriteRule ^viewforum\.php "http\:\/\/community.geospike.com\/viewforum.php" [R=301,L]

RewriteCond %{QUERY_STRING} f=(26|27|29)
RewriteRule ^viewtopic\.php "http\:\/\/community.geospike.com\/viewtopic.php" [R=301,L]

The RewriteCond ensures the redirection only applies to the 3 forum IDs that I wanted. The rewrite rule matchs the viewforum and viewtopic links to the new forum, with a “permanent” 301 redirect. As the RewriteRule regex is not terminated with “$”, all the parameters are sent to the new URL.

Easy.

*name

*e-mail

web site

leave a comment


 

free winrar download

free winrar download

winrar download free

winrar download free

windows 7 key generator

windows 7 key generator

windows 7 activation crack

windows7 activation crack

free winzip

free winzip

free winrar

free winrar

winzip free download

winzip free download

winrar free download

winrar free download

windows 7 crack

windows 7 crack

winzip free download full version

winzip free download full version

winzip activation code

winzip activation code

windows 7 product key

windows 7 product key
\n