Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/267.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.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
Php 浏览器url正在更改,显示实际url位置_Php_.htaccess - Fatal编程技术网

Php 浏览器url正在更改,显示实际url位置

Php 浏览器url正在更改,显示实际url位置,php,.htaccess,Php,.htaccess,嗨,贝娄是我的重写规则,它工作得很好 RewriteRule ^forms/result/([A-Za-z0-9-\s]+)/([0-9]+)/?$ http://www.xyz.com/forms/search_box.php?query=$1&page=$2 [R=301,NC,L] 当我请求brouser URL中的以下链接时 http://www.xyz.com/forms/result/700011/1 它使用正确的数据打开特定的search_box.php文件

嗨,贝娄是我的重写规则,它工作得很好

  RewriteRule ^forms/result/([A-Za-z0-9-\s]+)/([0-9]+)/?$    http://www.xyz.com/forms/search_box.php?query=$1&page=$2 [R=301,NC,L]
当我请求brouser URL中的以下链接时

 http://www.xyz.com/forms/result/700011/1
它使用正确的数据打开特定的search_box.php文件,但brouser URL更改为实际URL,就像下面所说的那样。我不想更改请求的URLurlhttp://www.xyz.com/forms/result/700011/1 在浏览器上

http://www.xyz.com/forms/search_box.php?query=700019&page=3

您还没有为form/search_box.php编写规则?我正在将^forms/result/映射到forms/search_box.phppost整个重写块hi@Tabby我只有这个重写规则:RewriteRule^forms/result/[A-Za-z0-9-\s]+/[0-9]+/?$http://www.xyz.com/forms/search_box.php?query=$1&page=$2[R=301,北卡罗来纳州,北卡罗来纳州]