httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrea Rossignoli" <softw...@polin.it>
Subject Re: [users@httpd] Need help with a RewriteCond Statement (http/https)
Date Mon, 10 Mar 2003 19:16:07 GMT
Hi,

from a regular expressions point of view the syntax is:

https?

the ? before the s means that the s is optional,
so in that case http and https a both matched.

I have many doubts about the first rule you wrote,
did you test them ?

So If understand your needs,
I'd write:

RewriteCond %{HTTP_REFERER} !^https?://.*(sample_text|sample_numeric)$ [NC]



:-) Andrea



----- Original Message -----
From: "Mike" <mike.lists@levrah.net>
To: <users@httpd.apache.org>
Sent: Thursday, April 10, 2003 18:10
Subject: [users@httpd] Need help with a RewriteCond Statement (http/https)


> Hello.
>
> I have a question about a RewriteCond statement.
>
> I'm not sure how to do it, but I would like to change the following
> one-liner - where the "http://" portion is located - to have it recognize
> either or both non-ssl (http://) and ssl (https://).
>
> RewriteCond %{HTTP_REFERER}
> !^($|(http://)?[^/]*(sample_text|sample_numeric)) [NC]
>
> I'm thinking it may be this, but I am unsure.
>
> RewriteCond %{HTTP_REFERER}
> !^($|(http://|https://)?[^/]*(sample_text|sample_numeric)) [NC]
>
> Can someone help me with that please...
>
> Thanks.
> -mike
>
>
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
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