0
回答
wordpress 3.2.1 去掉url中index.php的问题。
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   

wordpress 3.2.1 安装多用户模式。

原本一切正常,今天突然尝试下其中的设置,我进入

固定链接设置

修改了分类目录前缀 和 标签前缀,结果常规设置里就多了个index.php,然后再也无法去除了。

其余子站点均正常。

请大家帮忙。

server_name_in_redirect off;
port_in_redirect off;

location = /favicon.ico {
        log_not_found off;
        access_log off;
}
location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
}
location ~ /\. {
        deny all;
        access_log off;
        log_not_found off;
}
# WordPress multisite subdirectory rules.
location / {
        try_files $uri $uri/ /index.php?$args;
}

# Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;


# Pass uploaded files to wp-includes/ms-files.php.
rewrite /files/$ /index.php last;

# For multisite:  Use a caching plugin that creates symlinks to the correct subdirectory structure to get some performance gains.
set $cachetest "$document_root/wp-content/cache/ms-filemap/${host}${uri}";
if ($uri ~ /$) {
        set $cachetest "";
}
if (-f $cachetest) {
        # Rewrites the URI and stops rewrite processing so it doesn't start over and attempt to pass it to the next rule.
        rewrite ^ /wp-content/cache/ms-filemap/${host}${uri} break;
}

if ($uri !~ wp-content/plugins) {
        rewrite /files/(.+)$ /wp-includes/ms-files.php?file=$1 last;
}
# Rewrite multisite '.../wp-.*' and '.../*.php'.
if (!-e $request_filename) {
        rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) $1 last;
        rewrite ^/[_0-9a-zA-Z-]+.*(/wp-admin/.*\.php)$ $1 last;
        rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ $1 last;
}

举报
waney
发帖于6年前 0回/1K+阅
顶部