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

Installing WordPress in a subdirectory

zastavra

Formally Stevez
#1
I have Xenforo installed in the root directory and I just installed WordPress in /articles sub directory. Well, everything is working fine using the WordPress default URL structure but when I am changing it to domain.com/articles/%postname%/ the WordPress post is getting redirected to Xenforo's 404 page not found.

Any idea of what is wrong here?
 
Last edited:

Mike

XenForo developer
Staff member
#4
If you temporarily remove XF's .htaccess file, does it work? I would presume no, which likely points to an issue with the WP .htaccess configuration. XF won't be involved in any way if there's an articles sub-directory (unless there's a 404 within that the articles/.htaccess file doesn't grab).
 

zastavra

Formally Stevez
#5
I use nginx as a Web server, so I guess the virtual block configuration must be involved with this.

So, is it something specific that I should look for?
 
Last edited:

zastavra

Formally Stevez
#6
I think adding
Code:
location /articles/ {
        try_files $uri $uri/ /articles/index.php?$uri&$args;
    }
in the server block config is fixing the problem. It seems to work fine now.

Thanks.