XF 1.5 Redirecting Xenforo to Subfolder (Nginx)

Varma

Member
Hey guys need a urgent help with this.

Today i moved by Xenforo installation from root directory to subfolder /forums. (have now a WordPress on the root directory)

So now i need to permanently redirect all old request (threads|forums|members) to the new /forums destination in the correct threads. Like /forums/threads/xxxx-124/

I tried one code from here
Code:
        location ~* ^(threads|forums|members)/.*$ {
                rewrite (threads|forums|members)/(.*)$
/community/$1/$2 permanent;
        }

But it seems to be not working.
Can anyone urgently help me on this? On the the way, i'm on a Nginx server.
 
Given that you've moved to a forums sub-directory, you likely can't redirect the "forums" links using that code. There will certainly be some ambiguity there. But what happens if you remove that from the the 2 regexes? What problems are you running into?
 
Actually, i have a Route filter that changes forums/ to discuss/, so I guess that won’t cause a conflict.

On the way i have somewhat corrected the issue by adding like this

Code:
location ^~ /threads {
                rewrite ^/threads/(.*)$ /forums/threads/$1 redirect;
        }
location ^~ /discuss {
                rewrite ^/discuss/(.*)$ /forums/discuss/$1 redirect;
        }
location ^~ /members {
                rewrite ^/members/(.*)$ /forums/members/$1 redirect;
        }
location ^~ /tags {
                rewrite ^/tags/(.*)$ /forums/tags/$1 redirect;
        }

Hope it correct?

But now i'm facing another issue. When i try to change the Board URL under Basic Board information to the new subfolder.

I'm getting the following errors
The following sub-option(s) are unknown: type.

Can i know how to solve that?
 
I'd guess that may be related to another option that's displayed on that page. Unfortunately, the error won't give you the specific value and this is generally something that'd be more of a developer error message. You may need to disable add-ons to see if it gets resolved (though I'm not positive it will actually hide options from disabled add-ons; there would be pluses and minuses to that).
 
Back
Top Bottom