请教各位大侠一个关于 wordpress 的问题

2018-01-21 19:16:59 +08:00
 a852022

我的网站是用伪静态的,然后别的都正常就是分类目录和标签点进去然后按下一页就 404,但是很奇怪我首页点进去按下一页又是正常的,首页他也是后面加 /的都正常,我看了一下就是我分类目录和标签页点进去按下一页他是这样的 category/tlxw/page/3/他就 404.如果我把 3 后面的斜杠去掉 category/tlxw/page/3 这样子他又能正常显示第 3 页,默认是多一条斜杠他就显示 404,求大侠帮帮我小白刚接触不太懂啊不知道跟伪静态有没有关系谢谢了 下面这个就是我伪静态。我用的是 /%post_id%.html

3600 = 1 hour

CacheClockRate 3600 RepeatLimit 32

Protect httpd.ini and httpd.parse.errors files

from accessing through HTTP

wordpress 伪静态规则

For tag (中文标签以及标签翻页的规则)

RewriteRule /tag/(.*)/page/(\d+)$ /index.php?tag=$1&paged=$2 RewriteRule /tag/(.+)$ /index.php?tag=$1

For category (中文分类以及分类翻页的规则)

RewriteRule /category/(.)/page/(\d+)$ ?category_name=$1&paged=$2 RewriteRule /category/(.) ?category_name=$1

For sitemapxml

RewriteRule /sitemap.xml /sitemap.xml [L] RewriteRule /favicon.ico /favicon.ico [L] RewriteRule /shenma-site-verification.txt /shenma-site-verification.txt [L] RewriteRule /10a7fca63634c1968e024906b3790978.txt /10a7fca63634c1968e024906b3790978.txt [L] RewriteRule /baidu_verify_HHNFDuXzMv.html /baidu_verify_HHNFDuXzMv.html [L] RewriteRule /sogousiteverification.txt /sogousiteverification.txt [L]

For file-based wordpress content (i.e. theme), admin, etc.

RewriteRule /wp-(.*) /wp-$1 [L]

For normal wordpress content, via index.php

RewriteRule ^/$ /index.php [L] RewriteRule /(.) /index.php/$1 [L] RewriteRule /index.php/(.) /index.php/$1 [L]

653 次点击
所在节点    问与答
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/424721

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX