httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Andersson" <rob...@profundis.nu>
Subject Re: [users@httpd] Again About ReWriting URL
Date Fri, 03 Sep 2004 09:00:53 GMT
Erwien Samantha Y wrote:
> Can you tell me what the meaning  "!.+" ?
> RewriteCond %{HTTP_REFERER}%{HTTP_USER_AGENT} !.+

Dot (.) matches any character, the plus sign (+) matches one or more
instances of the previous. So, the expression ".+" matches anything but an
empty string. Exclamation mark (!) negates the test, thus the condition is
"if the string is empty". Having said that, I realize that the expression
"^$" would make more sense :)

> this the real condition that  i want to do ..
>
> Deny this request because there're no INFO about HTTP_REFERER
> and HTTP_USER_AGENT

Does the rule seem to work? Are you sure it is only "admin.html" you want to
protect this way, and not other URIs it might link to?

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message