Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.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
Apache 如何从htaccess重写规则中删除查询字符串。给定的解决方案不';我似乎不想做这件事_Apache_.htaccess_Mod Rewrite - Fatal编程技术网

Apache 如何从htaccess重写规则中删除查询字符串。给定的解决方案不';我似乎不想做这件事

Apache 如何从htaccess重写规则中删除查询字符串。给定的解决方案不';我似乎不想做这件事,apache,.htaccess,mod-rewrite,Apache,.htaccess,Mod Rewrite,询问如何删除重定向时的查询字符串。 给出的答案(添加?)正是Apache手册中给出的答案。然而,它似乎不起作用(是的,可能是我)。 用同样的例子 起始URL: http://www.myurl.org.uk/viewtopic.php?f=3&t=44207&start=2265 重写代码: Options +FollowSymlinks -MultiViews RewriteEngine On RewriteRule ^viewtopic.php http://www.my

询问如何删除重定向时的查询字符串。 给出的答案(添加?)正是Apache手册中给出的答案。然而,它似乎不起作用(是的,可能是我)。 用同样的例子

起始URL:

http://www.myurl.org.uk/viewtopic.php?f=3&t=44207&start=2265
重写代码:

Options +FollowSymlinks -MultiViews
RewriteEngine On

RewriteRule ^viewtopic.php http://www.myurl.org.uk/? [R=301]
输出URL:

http://www.myurl.org.uk/?f=3&t=44207&start=2265 
我希望:

http://www.myurl.org.uk/
这已在htaccess.madewithlove.be上进行了测试/

非常感谢