开发者

Escaping mod_rewrite keywords

I am currently using the following rule in mod_rewrite:

RewriteRule /request/([0-9]+)$ /request.php?id=$1

T开发者_高级运维hat rule does not work, while "requests" instead of "request" in the regexp works. My assumption is that "request" is a keyword of mod_rewrite or apache, but I cannot verify that.

When I use "request", the redirect works but $1 is always empty , although the url is definetely correct.

Thanks


Well, request is not a mod_rewrite keyword. Keywords always have bounds: [QSA], ${mapname:key|default}, %{NAME_OF_VARIABLE}...


I could solve the problem by disabling "Multiviews" in the apache configuration.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜