Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess 传递的Url包含转义字符。要更正的访问规则_.htaccess_Mod Rewrite_Seo_Html Escape Characters - Fatal编程技术网

.htaccess 传递的Url包含转义字符。要更正的访问规则

.htaccess 传递的Url包含转义字符。要更正的访问规则,.htaccess,mod-rewrite,seo,html-escape-characters,.htaccess,Mod Rewrite,Seo,Html Escape Characters,我需要建议htaccess规则解码url字符串,例如: 实际页面是 http://www.mycarhelpline.com/index.php?option=com_latestnews&view=detail&n_id=953&Itemid=10 但该页面在谷歌中被缓存为 http://www.mycarhelpline.com/index.php%3Foption%3Dcom_latestnews%26view%3Ddetail%26n_id%3D953%26It

我需要建议htaccess规则解码url字符串,例如:

实际页面是

http://www.mycarhelpline.com/index.php?option=com_latestnews&view=detail&n_id=953&Itemid=10
但该页面在谷歌中被缓存为

http://www.mycarhelpline.com/index.php%3Foption%3Dcom_latestnews%26view%3Ddetail%26n_id%3D953%26Itemid%3D10
解码的字符串将导致正确的url

很抱歉,因为我根本不知道htaccess规则,因此没有粘贴代码。是否有任何htaccess规则可以删除转义字符并通过重定向获得正确的url

更新 如


谢谢-以及如何在php@anubhava-编辑完成,您能否建议这是添加urldecode的正确方法,如示例代码所示谢谢-但不知何故-看起来仍然像是一个问题,主要是由于%3F-是否可以通过htaccess将%3F解码到?标记-它可能用于附加访问代码-虽然部分工作-但不会将%3f转换为?