httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike <mike.li...@levrah.net>
Subject Re: [users@httpd] Need help with a RewriteCond Statement (http/https)
Date Thu, 10 Apr 2003 18:51:11 GMT
Hi Andrea.

Thanks. I'll test it here in a second. But wanted to answer your question. 
Yes. The pasted rule (with the exception of the literals "sample text" and 
"sample numeric") came from an actively used rule; one that's been in-use 
for quite a good long while. It may be that it's been used for so long that 
it's "technically out-dated" now? That's entirely possible...

Going to test out "...https?..." in a few...

Thanks!
-mike

At 02:16 PM 3/10/2003, you wrote:
>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


Mime
View raw message