使用querystring重写apache url无效

使用querystring重写apache url无效,apache,Apache,我已经搜索了这个网站和谷歌,但我的问题没有运气,我需要更改此URL: http://domain.xx/bedrijf/nieuws-detail.php?id=33 到 这是我在Apache配置文件中使用的内容: RewriteRule ^/bedrijf/nieuws-detail\.php$ /nieuws_detail\.php?%{QUERY_STRING} [NC,L] 重写日志告诉我: init rewrite engine with requested uri /bedrij

我已经搜索了这个网站和谷歌,但我的问题没有运气,我需要更改此URL:

http://domain.xx/bedrijf/nieuws-detail.php?id=33

这是我在Apache配置文件中使用的内容:

RewriteRule ^/bedrijf/nieuws-detail\.php$ /nieuws_detail\.php?%{QUERY_STRING} [NC,L]
重写日志告诉我:

init rewrite engine with requested uri /bedrijf/nieuws-detail.php
applying pattern '(.*)' to uri '/bedrijf/nieuws-detail.php'
applying pattern '^/bedrijf/nieuws-detail\\.php$' to uri '/bedrijf/nieuws-detail.php'
rewrite '/bedrijf/nieuws-detail.php' -> '/nieuws_detail.php?id=25'
split uri=/nieuws_detail.php?id=25 -> uri=/nieuws_detail.php, args=id=25
local path result: /nieuws_detail.php
prefixed with document_root to /var/www/html/nieuws_detail.php
(1) go-ahead with /var/www/html/nieuws_detail.php [OK]

但是我仍然得到一个404

文件夹/var/www/html/中是否存在nieuws_detail.php?至于规则,这应该是您需要重写的全部规则^/bedrijf/nieuws detail\.php$/nieuws_detail.php[QSA,NC,L]您还有其他规则吗?如果是这样的话,也可以发布其他规则。我将[L,R=301]放在规则的末尾,现在它开始工作了,但实际上nieuws_detail不存在于/var/www/html文件夹中。。。
init rewrite engine with requested uri /bedrijf/nieuws-detail.php
applying pattern '(.*)' to uri '/bedrijf/nieuws-detail.php'
applying pattern '^/bedrijf/nieuws-detail\\.php$' to uri '/bedrijf/nieuws-detail.php'
rewrite '/bedrijf/nieuws-detail.php' -> '/nieuws_detail.php?id=25'
split uri=/nieuws_detail.php?id=25 -> uri=/nieuws_detail.php, args=id=25
local path result: /nieuws_detail.php
prefixed with document_root to /var/www/html/nieuws_detail.php
(1) go-ahead with /var/www/html/nieuws_detail.php [OK]