0

我的主机服务器是nginx

在根目录中我安装了 magento,然后我创建了一个名为 blog 的文件,然后将 wordpress 安装到其中。现在,目录是:

app
includes
....
blog/wp-admin

当我http://www.example.com/blog/index.php/%postname%.html在永久链接设置中设置时。访问所有帖子,没关系。现在我想删除 index.php。即在http://www.example.com/blog/%postname%.html我删除 index.php 时将其更改为 . 并非所有帖子都无法使用,

编辑:我把代码放在 nginx.conf 中。

location /blog/ {
    index index.php;
    try_files $uri $uri/ /blog/index.php?$uri&$args;
    rewrite ^ /index.php? last;
}

但它不起作用。我丢了什么东西吗?

4

0 回答 0