开发者

Escaping mod_rewrite keywords

开发者 https://www.devze.com 2023-04-12 08:20 出处:网络
I am currently using the following rule in mod_rewrite: RewriteRule /request/([0-9]+)$ /request.php?id=$1

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

精彩评论

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

关注公众号