Redirect from /community/ tot Root


Well-known member

The forum has been moved from the 'community' folder to the root.
Of course the forum is still full of references to the 'community' folder.

This will probably have to be done with lines in the .htaccess file.

Can an expert here please make these lines for me, and tell me which .htaccess file to put them in.

Old URL:
New URL:
RewriteRule ^/?community/(.*)$ /$1 [R=301,L]
should work

put it in the core xf htaccess file in root after rewrite engine on and before the xf default rules
Also, you may want to run a db update to remove 301s internally.

back up your DB and TEST THIS before running on live data.

UPDATE xf_post SET message = REPLACE(message, '', '');

you may also want to run this a few times if you have mixed www or http/https in there. just make sure your replacement is even for the context.

using just the suffix above (domainname, no http or www) will leave whatever was posted as-is.
Last edited:
@bransol Thank you very much for your help!

phpmyadmin ask for a 'end quote', but I don't know where exactly to put it in the code line.
'UPDATE xf_post SET message = REPLACE(message, '', '');
Top Bottom