WordPress 3.0 & nginx - permalink, 404 problem

前端 未结 8 2064
清歌不尽
清歌不尽 2021-02-08 16:26

I\'ve installed nginx, FastCGI and PHP on my server. WordPress 3.0 installed after a bit of a monster battle, but it\'s installed and working well.

However, when I chang

8条回答
  •  失恋的感觉
    2021-02-08 16:43

    If wordpress is on another directory besides the root, instead of having

    if (!-e $request_filename) {
        rewrite ^/wordpress/(.+)$ /wordpress/index.php?q=$1 last;
    }
    

    You can have:

    location /wordpress {
        try_files $uri $uri/ /wordpress/index.php?$args;
    }
    

    This page has exactly the same concept. I should have read and tried it first: nginx rewrite rule under a subdirectory

提交回复
热议问题