Please would someone explain in simple terms what these rules are doing:

RewriteEngine on
RewriteRule .* - [E=HTTP_IF_MODIFIED_SINCE:%{HTTP:If-Modified-Since}]
RewriteRule .* - [E=HTTP_IF_NONE_MATCH:%{HTTP:If-None-Match}]
link|improve this question
feedback

1 Answer

up vote 4 down vote accepted

It's matching any input (.*), and redirecting to the same location, setting the Environmental variables (HTTP_IF_MODIFIED_SINCE and HTTP_IF_NONE_MATCH) equal to the value in the http headers (If-Modified-Since and If-None-Match respectively).

Basically it's just pulling some HTTP Header information and putting it in Environmental variables, presumably for future logic to take some action dependent on the variables.

link|improve this answer
The reason I ask is I'm investigating a possible intrusion and I didn't remember writing them. Could this be used maliciously? – shanethehat Jul 26 '11 at 15:43
@shanethehat These rules cannot make harm on their own. – LazyOne Jul 26 '11 at 15:57
Fair enough, then I shall look elsewhere. Thanks folks. – shanethehat Jul 26 '11 at 16:09
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.