mod_rewrite help


Active member
Currently my xenforo is installed in the document root folder and I would like to move it to a subfolder (like community) without breaking any existing links.

Is it possible with .htaccess and mod_rewrite to redirect all my forum traffic (like forums, pages, etc) to /community while leaving traffic to my document root alone (traffic to /)?


Active member
After much trial and error it looks like this works pretty well:

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^(forum|threads|pages|events|media|members)/(.*)$ /community/$1/$2 [NC,L,R=301]