htaccess redirect after forum move

grantus

Active member
What would be the redirect to put in my htaccess for my forum move? Right now my forum is in the root (public_html), and I'm moving it to the "forums" folder (public_html/forums).

I want to make sure all threads are redirect properly.

Thanks.
 
Simple redirection should solve the problem, example:

Code:
RedirectMatch 301 /threads/(.*) /forums/threads/$1
 
Simple redirection should solve the problem, example:

Code:
RedirectMatch 301 /threads/(.*) /forums/threads/$1
I assume if you were going to move your forum out of /forums/ and into the root, you could simply reverse that.

PHP:
RedirectMatch 301 /forums/threads/(.*) /threads/$1
 
I should point out that redirect will only work for that route (/threads).

For example, if you were moving from the /community directory to the root, you would use:
Code:
RewriteRule ^community/(.*)?$ /$1 [R=301,L]
 
I should point out that redirect will only work for that route (/threads).

For example, if you were moving from the /community directory to the root, you would use:
Code:
RewriteRule ^community/(.*)?$ /$1 [R=301,L]
What if the forum installed on a folder /forums/ then moved to the root folder.
RewriteRule ^forums/(.*)?$ /$1 [R=301,L]
Not redirecting correctly forum nodes url's :/
 
Back
Top Bottom