apache .htaccess删除.php后的所有内容

我试图让所有的网站来作为site.php而不是site.php?abc = 1 …等

目前我的.htaccess文件显示如下:
RewriteCond %{QUERY_STRING} .+
RewriteRule ^(.*)$ /$1? [R=301,L]
Options -Indexes
但是这不起作用。 任何帮助,将不胜感激

这工作:

 <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{QUERY_STRING} .+ RewriteRule ^(.*)$ /site.php? [R=301,L] </IfModule> 

用apache2testing过

对于每一个页面(不只是“site.php”),你可以使用

 RewriteCond %{QUERY_STRING} . RewriteRule (.*) $1?