将查询字符串重定向到根目录

Redirect query string to root

我已经尝试了多种重定向,根据研究重写了条件和规则,虽然我知道我有很多关于重定向的知识,但我真的很难弄清楚如何将查询字符串重定向到我的根目录:/

我需要重定向 http://www.stapletondenver.com/news/press_detail.asp?pressReleaseID=10 to http://www.stapletondenver.com

同样,我尝试了一些变体,包括以下内容:

RewriteCond %{QUERY_STRING}  ^/news/press_detail.asp?pressReleaseID=10$
RewriteRule (.*)  /?  [R=301,L]

我在正确的轨道上吗and/or我做错了什么?非常感谢所有帮助,提前致谢!

尝试:

RewriteCond %{QUERY_STRING}  ^pressReleaseID=10$
RewriteRule ^/?news/press_detail\.asp$  /?  [R=301,L]

%{QUERY_STRING}变量只是查询字符串,不是URI的任何部分。