gpt4 book ai didi

.htaccess - htaccess 301 从带有逗号的 URL 重定向不会重定向

转载 作者:行者123 更新时间:2023-12-02 09:23:15 25 4
gpt4 key购买 nike

我有一小部分 URL,我想在我的 .htaccess 文件中对其进行 301 重定向。

问题是,原始 URL 包含一些奇怪的参数格式,这似乎破坏了重定向。

基本上我需要这个重定向才能工作:

redirect 301 "/index.php?id=365,0,0,1,0,0" http://example.com/about/

example.com 也有一个 index.php 文件,但在我看来它无论如何都应该重定向。

有人对此有见解吗?

谢谢

最佳答案

?id=365,0,0 ... 替换为 \?id=(\d\d\d.*)$

或者

RewriteRule http://example.com/index.php?id=(\d\d\d.*)$ http://www./example.com/about/ [R=301,L]

关于.htaccess - htaccess 301 从带有逗号的 URL 重定向不会重定向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12269151/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com