字preSS 404万亩没有结束斜线 [英] wordpress mu 404 without end slash

查看:183
本文介绍了字preSS 404万亩没有结束斜线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装一个字preSS MU安装,几乎一切似乎都处于工作状态。 当我打site.com/subsite我得到site.com了404,但是当我去site.com/subsite/~~V(注意最后的斜线)全部的寄托似乎很好地工作。

I've just setup a wordpress MU install and almost everything seems to be in working order. When i hit site.com/subsite i get a 404 on site.com but when i go to site.com/subsite/ (notice the trailing slash) everthing seems to work fine.

生成的Word preSS的mod_rewrite code是

the generated wordpress mod_rewrite code is

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
# END WordPress

这是我应该如何调整这个任何建议或任何其他设置,停止404?

any suggestions on how i should adjust this or any other settings to stop the 404s?

推荐答案

我已经打了这个问题对于网页,但没有使用多站点安装使用博客的子路径(仅适用于由不同的域)的区别。

I've hit this issue with respect to pages, but haven't used a multisite install with blogs differentiated by subpaths (only by different domains).

然而,可能以相同的方式来解决:

However, it may be solved in the same way:

进入设置 - >永久链接管理页面并修改固定链接结构来消除结尾的斜线。例如,如果有默认或选定的preset中的一个,只是重复串入的自定义字段,但是没有和斜线。

Go to the Settings -> Permalink admin page and modify the permalink structure to eliminate the trailing slash. For example, if it has the default or one of the presets selected, just duplicate the string into the custom field, but without and trailing slash.

WP总是从一个到另一个(例如从 http://example.com/ 发出重定向 http://example.com - 或者,如果你有尾随斜线在固定链接结构),反之亦然

WP will always issue a redirect from one to the other (e.g. from http://example.com/ to http://example.com - or vice-versa if you do have trailing slashes in the permalink structure)

我不知道为什么它发出的302 404为您site.com而不是site.com/~~V (也许重定向到规范网址实际上是一个选择的地方)

I don't know why it is issuing a 404 for your site.com instead of a 302 to site.com/ (perhaps redirection to the canonical URL is actually an option somewhere)

希望有所帮助。

这篇关于字preSS 404万亩没有结束斜线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆