301重定向问题,由问号引起

时间:2019-06-27 01:17:04

标签: redirect http-status-code-301

我有一些带有问号的URL,我希望将它们重定向,但无法正常工作: 重定向301 /类别/过敏与不耐受-差异是什么?/ https://www.example.com/articles.html/allergy-vs-intolerance/

我搜索了很多过去的帖子,但是问号通常用在查询字符串中,而不是用它们出现在我的URL中的方式。

所以这不起作用:

RewriteCond%{QUERY_STRING} ^不宽容是什么差异$ [NC] RewriteRule ^ index.php $ https://www.example.com/articles.html/allergy-vs-intolerance/? [R = 301,L,NC]

我找不到404。

请注意,原始网址为: https://www.example.com/categories/Allergy-vs.-Intolerance-What-is-the-Difference?/

目标URL为: https://www.example.com/articles.html/allergy-vs-intolerance/

0 个答案:

没有答案