• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

htaccess redirect after forum move

grantus

Active member
#1
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.
 

Adam Howard

Well-known member
#4
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
 

Brogan

XenForo moderator
Staff member
#5
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]
 

RoldanLT

Well-known member
#6
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 :/