XF 1.5 How to move Xenforo from sub domain to sub folder

So, i decided to move my forum from the sub domain to sub folder.

forum.example.com "TO" www.example.com/forum

When I tried moving all the files to a different directory. All of the threads and forums received page not found error


XenForo moderator
Staff member
You likely didn't copy the hidden .htaccess file and have friendly URLs enabled.

Rename the htaccess.txt file to .htaccess.
Thanks for the help

@Mike In search engine result page, some of the threads has the old URL. For exaple

The new url is website.com/forum

but it shows forums.website.com for some of the threads


XenForo developer
Staff member
As long as you have 301 redirects in place, this should be updated over time as the URLs are recrawled.
You'd be better off placing redirects for the entire old URL to the new URL (anything from forum.domain.com/* will be redirected to domain.com/forum/*). There are a few approaches to this. Here's one example: Simple Redirect Subdomain to a Directory
I have tried the one you shared, but it is not working.

Traffics from forum.website.com does not redirect to www.website.com/forum.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^forum\.yourdomain\.com
RewriteRule ^(.*)$ http://www\.yourdomain\.com/forum/$1 [L]