【发布时间】:2018-04-10 13:49:19
【问题描述】:
我最近更改了永久链接结构
https://www.domainName.ro/2018/04/10/post-name.html
到
https://www.domainName.ro/post-name.html,
使用:
"RedirectMatch rule 301 ^/([0-9]{4})/([0-9]{2})/([0-9]{2})/([^/]+).html$ https://www.domainName.ro/$4.html" 并且有效。
现在我想在同一个站点(旧 URL)内重定向来自
的 URLhttps://www.domainName.ro/2018/04/10/post-name/
到
https://www.domainName.ro/post-name.html
我尝试了不同的规则,但没有奏效。 这两条规则必须在网站上同时起作用
你能帮帮我吗? 非常感谢!
【问题讨论】:
-
我试过这个规则:domain.ro/$3.html >> 得到这个:domain.ro/post/.html>> 哪里出错了?
标签: wordpress url-redirection http-status-code-301 permalinks