XF 1.2 From folder with subdomain to root

Sheratan

Well-known member
So I had XF installed in /forum folder, with subdomain forum.domain.com

Is there any .htaccess redirect rules if I wanted to move XF to root? So any forum.domain.com/thread and /posts and the other will be redirected to domain.com/forum (root, not folder)

Thank you.
 

MattW

Well-known member
So what will be the new URL for the site once you have moved it?

domain.com/forum/ (like XF is xenforo.com/community/)
or just domain.com
 

Sheratan

Well-known member
Yes.

Right now my XF forum is inside a folder, /forum folder, with a forum.domain.com subdomain.

I wanted to move all xf forum to root, with portal as index and forum as /forum route, and add some redirect rules so I don't lose any forum.domain.com link
 

MattW

Well-known member
I think you should be OK with just redirecting the subdomain to the main domain.

Not sure if @Jake Bunce can clear things up though.
 

Jake Bunce

XenForo moderator
Staff member
Not sure if that's greedy or not. I would use this to be sure:

Code:
        RewriteCond %{HTTP_HOST} ^forum\.komikanimasi\.web\.id$
        RewriteRule ^(.*)$ http://komikanimasi.web.id/$1 [R=301,L]
 

Sheratan

Well-known member
Sorry for asking again. I need to put that rules inside htaccess /forum folder or inside htaccess root?
 
Top