typecho nginx pseudo-static rules installed in subdirectories

Use lnmp set up a server environment, Typecho site installation and installation in a subdirectory in the root directory of nginx pseudo-static rules used will vary, pseudo-static rules directly use the root directory if installed in a subdirectory of typecho website, then there will be reception 404 Not Found article open display, landing typecho website background also showed 404 Not Found circumstances, therefore subdirectory typecho normal access to the site will add a pseudo-static rules corresponding to the following pseudo-static rules blog pro-test can be used to install it in subdirectory typecho site.

Site subdirectory typecho pseudo-static rules

1
2
3
4
5
location /foldername/ {
    if (!-e $request_filename) {
        rewrite ^(.*)$ /foldername/index.php$1 last;
    }
}

The pseudo-static rules in the above foldernamemodifications to the subdirectory name.

Guess you like

Origin www.cnblogs.com/wnh678/p/11872869.html