子文件夹多站点中的类别永久链接出现 404 错误
我有一个多站点 WordPress 3.1,使用子目录来分隔各个站点。 由于某些原因,类别永久链接不起作用,每个类别页面都会出现 404 错误。标签页也是如此。
我尝试将 .htaccess 文件重置为此处提到的默认文件: http://codex.wordpress.org/ Create_A_Network#.htaccess_and_Mod_Rewrite
我尝试将主题更改为Wordpress默认值,同样的错误。
我停用了所有插件,同样的错误。
我使用永久链接 /%year%/%monthnum%/%day%/%postname%/ 以及默认类别和标签库。 注意:如果我将永久链接更改为默认值,它就可以工作!但我不需要 http://site/?p=123
链接。
I have a multisite WordPress 3.1, using subdirectories to separate the individual sites.
For some reason category permalinks don't work, I get 404 errors for every category page. The same goes for tag pages.
I have tried resetting .htaccess file to the default one mentioned here: http://codex.wordpress.org/Create_A_Network#.htaccess_and_Mod_Rewrite
I have tried changing the theme to Wordpress default, same error.
I deactivated all plugins, same error.
I use permalinks /%year%/%monthnum%/%day%/%postname%/ and default category and tag base.
Note: If I change permalink to default, IT WORKS! But I don't want the http://site/?p=123
links.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
同样的问题在这里。由于某种原因,您必须再次重置每个博客的永久链接。对我有帮助的是:以管理员身份登录,chmod .htaccess,转到永久链接,选择并保存永久链接结构并将 .htaccess chmod 为默认值。完整文章@ http://www.squidoo.com/wordpress-not-found-错误修复。在wordpress上我发现这篇文章: http://wordpress.org/support/topic/post-title-links-do-not-work-404-problem-page-not-found。希望对你有帮助。
same problem here. for some reason you have to reset the permalinks per blog again. what helped me is:, login as admin, chmod the .htaccess, goto permalinks, choose and save the permalink structure and chmod the .htaccess to the default. full article @ http://www.squidoo.com/wordpress-not-found-error-fix. on wordpress i found this article: http://wordpress.org/support/topic/post-title-links-do-not-work-404-problem-page-not-found. hope it helps you.
我自己通过将重写规则添加到 Directory 标记下的 Apache SSL 配置来解决了这个问题。祝你好运
I solved this myself by adding the rewrite rules to the Apache SSL configuration under the Directory tag. Best of luck
使用 Nginx 在 WordPress 上启用自定义永久链接有点棘手但很简单。如果您使用启用了“mod_rewrite”的 Apache,WordPress 会自动将重写规则添加到您的“.htaccess 文件”中。
但是,使用 Nginx,您需要定义重写规则,并将“try_files”指令添加到您的域/网站的 Nginx 配置文件中。否则,如果您在 WordPress 上启用了自定义永久链接并且正在使用 Nginx,则单击帖子 URL 将返回带有“404 错误”的页面。
您可以在这里找到详细的分步信息:WordPress 自定义永久链接和 Nginx
Enabling custom permalinks on WordPress with Nginx is bit tricky but easy. If you are using Apache with ‘mod_rewrite‘ enabled, WordPress will automatically add the the rewrite rules to your ‘.htaccess file’.
But, with Nginx you need to define the rewrite rules as well as add the ‘try_files’ directive to the Nginx configuration file for your domain/website. Otherwise, if you have enabled the custom permalinks on WordPress and you are using Nginx, then clicking the post URL will return a page with ‘404 Error‘.
You may find step by step detailed information here: WordPress custom permalinks and Nginx