nginx WordPress URL 重写

Dou*_*eri 5 php wordpress nginx url-rewriting

我刚刚安装了 nginx 1.0.8 和 php-fpm,在过去 30 分钟里我试图重写 WordPress 的 URL。

Wordpress URL 应如下所示: http://localhost/website/blog/2011/10/sample-post/

我看过这个教程:http://wiki.nginx.org/WordPress + 网络上的许多其他教程,但每次我收到 404 错误(有时是 403)。

这是我在配置文件中所做的:

    location /website/blog {
            try_files $uri $uri/ /website/blog/index.php;
    }

    location ~ \.php$ {
        root           html;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_intercept_errors on;
        fastcgi_split_path_info ^(/website/blog)(/.*)$;
        include        fastcgi_params;
        error_page  404 /404.html;
    }
Run Code Online (Sandbox Code Playgroud)

通过此配置,我收到“403 禁止”状态。

我缺少什么?

Ed *_*oom -1

保存配置后是否尝试重新启动 nginx?

另外,请在此处查看我的 nginx/WordPress 设置指南:

http://themesforge.com/featured/high-performance-wordpress-part-3/