[squid-users] regular expression help

2010-06-19 Thread Shahid Hussain
I am stuck with regular expression, I can't get my head around it! Can 
someone kindly help me please?


I need this url to be on the whitelist:

https://registrations.enable.mydomain.co.uk/Enable/Enable/enable_preapplications_conditions.jsp?isPAYMDown=false&cfunc=123&oid=45435345&ctx=M&mfunc=0 



As you can see "oid" is random ID.  User should be able to access this 
URL even though 'oid' is random.


If user access to: https://registrations.enable.mydomain.co.uk and 
mydomain.co.uk - it must not work.


How to do this with regular expression?

Thanks.



Re: [squid-users] Regular Expression

2007-08-07 Thread Enrico Popp
Henrik Nordstrom wrote:

>On tor, 2007-08-02 at 11:30 +0200, Enrico Popp wrote:
>  
>
>>Hello
>>
>>I have an problem with regular expression in squidGuard. I'm using the
>>following regex
>>
>>[EMAIL PROTECTED]://www.main.example.org/(.+)@http://[EMAIL PROTECTED]
>>
>>Now the problem consists that http://example.org contain no querystring
>>after this rewrite. Could you please help me to understand this regular
>>expression.
>>
>>
>
>What the above says:
>
>substitute http://www "any character" main "any character" example "any
>character" org/ "one or more characters as many as there is" with the
>string "http://www.example.org";
>
>Reservation: Not sure what the r modifier is about. Haven't seen that
>before.
>
>Regards
>Henrik
>  
>
In my documentation file,
/usr/share/doc/squidguard1.2.../text/configuration.tar.bz2 i've been
reading this lines

...

  where:
 * rew and rewrite are synonymous.
 * within and outside sets an optional time constraint to the
   definition.
 * the else part refers to the time constraint.

   Time constraints on rewritegroups can be used to make these groups
   functional within or outside a given time space only; Like redirect to
   local copies within peek business hours.

   Substitution is sed style (multiple):

  [EMAIL PROTECTED]@[EMAIL PROTECTED]

   where:
  from is a [62]regular expression that will be replaced with the
  string to.
  the i option makes the from part match case insensitive.
  the r option makes the redirection visible to the user with a
  [63]HTTP code 302 - Moved Temporarily (The default is to make
  Squid silently fetch the alternate URL).
  the R option makes the redirection visible to the user with a
  [64]HTTP code 301 - Moved Permanently.
...

Is this wrong?

Enrico



Re: [squid-users] Regular Expression

2007-08-07 Thread Henrik Nordstrom
On tor, 2007-08-02 at 11:30 +0200, Enrico Popp wrote:
> Hello
> 
> I have an problem with regular expression in squidGuard. I'm using the
> following regex
> 
> [EMAIL PROTECTED]://www.main.example.org/(.+)@http://[EMAIL PROTECTED]
> 
> Now the problem consists that http://example.org contain no querystring
> after this rewrite. Could you please help me to understand this regular
> expression.

What the above says:

substitute http://www "any character" main "any character" example "any
character" org/ "one or more characters as many as there is" with the
string "http://www.example.org";

Reservation: Not sure what the r modifier is about. Haven't seen that
before.

Regards
Henrik


signature.asc
Description: This is a digitally signed message part


Re: [squid-users] Regular Expression

2007-08-06 Thread Manoj_Rajkarnikar


[EMAIL PROTECTED]://www.main.example.org/@http://www.example.org/@r

should work, but I'm not sure what does the 'r' modifier do... something
squidguard-ish ?




Yes this works fine. If i had a querystring like

[EMAIL PROTECTED]://www.main.example.org/blbl/nbblbl/[EMAIL 
PROTECTED]://www.example.org/@r

then the url is only

http://www.example.org/

without the rest. I won't only to rewrite the subdomain into the domain. And the rest of 
the subdomain should be obtained. In my opinion the 'r' modifier means, that the client 
get "302 - moved temporarily".

kind regards

Enrico

Please someone do explain what does that "r" modifier do. I've searched 
books and googled for it but couldn't find any referrence of the "r" 
modifier to substitute.


Thanks
Manoj
 --


Re: [squid-users] Regular Expression

2007-08-06 Thread Enrico Popp
Matus UHLAR - fantomas wrote:

>On 02.08.07 11:30, Enrico Popp wrote:
>  
>
>>I have an problem with regular expression in squidGuard. I'm using the
>>following regex
>>
>>[EMAIL PROTECTED]://www.main.example.org/(.+)@http://[EMAIL PROTECTED]
>>
>>
>
>  
>

>where did you get the regex?
>
>  
>
>>Now the problem consists that http://example.org contain no querystring
>>after this rewrite.
>>
>>
>
>[EMAIL PROTECTED]://www.main.example.org/@http://www.example.org/@r
>
>should work, but I'm not sure what does the 'r' modifier do... something
>squidguard-ish ?
>
>  
>
Yes this works fine. If i had a querystring like

[EMAIL PROTECTED]://www.main.example.org/blbl/nbblbl/[EMAIL 
PROTECTED]://www.example.org/@r

then the url is only

http://www.example.org/

without the rest. I won't only to rewrite the subdomain into the domain. And 
the rest of the subdomain should be obtained. In my opinion the 'r' modifier 
means, that the client get "302 - moved temporarily".  

kind regards

Enrico


Re: [squid-users] Regular Expression

2007-08-05 Thread Matus UHLAR - fantomas
On 02.08.07 11:30, Enrico Popp wrote:
> I have an problem with regular expression in squidGuard. I'm using the
> following regex
> 
> [EMAIL PROTECTED]://www.main.example.org/(.+)@http://[EMAIL PROTECTED]

where did you get the regex?

> Now the problem consists that http://example.org contain no querystring
> after this rewrite.

[EMAIL PROTECTED]://www.main.example.org/@http://www.example.org/@r

should work, but I'm not sure what does the 'r' modifier do... something
squidguard-ish ?

> Could you please help me to understand this regular
> expression.

man perlre should help you
-- 
Matus UHLAR - fantomas, [EMAIL PROTECTED] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I just got lost in thought. It was unfamiliar territory. 


[squid-users] Regular Expression

2007-08-02 Thread Enrico Popp
Hello

I have an problem with regular expression in squidGuard. I'm using the
following regex

[EMAIL PROTECTED]://www.main.example.org/(.+)@http://[EMAIL PROTECTED]

Now the problem consists that http://example.org contain no querystring
after this rewrite. Could you please help me to understand this regular
expression.

best regards

Enrico


Re: [squid-users] Regular Expression Content Changes

2006-09-28 Thread Tino Reichardt
* Rob Gunther <[EMAIL PROTECTED]> wrote:
> I would like to use squid for a project I'm working on.
> 
> What I basically want to do is have all HTML pages that are pulled
> through squid have some search & replace filters run on them before
> being fed back to the client and stored in the cache.
> 
> I skimmed the manual, and see there are some plugins to do this to
> actual URL's themselves but does anyone have a suggestion how this
> could be done on actual HTML content?

Maybe this will work for you:
http://sites.inka.de/~bigred/devel/squid-filter.html


-- 
regards, TR


pgppDcJT8d1Mb.pgp
Description: PGP signature


Re: [squid-users] Regular Expression Content Changes

2006-09-27 Thread Tino Reichardt
* Rob Gunther <[EMAIL PROTECTED]> wrote:
> I would like to use squid for a project I'm working on.
> 
> What I basically want to do is have all HTML pages that are pulled
> through squid have some search & replace filters run on them before
> being fed back to the client and stored in the cache.
> 
> I skimmed the manual, and see there are some plugins to do this to
> actual URL's themselves but does anyone have a suggestion how this
> could be done on actual HTML content?

I think, it is planned for Squid 3, but the current 2.x releases haven't
such a feature.

If I am wrong and you find something usefull - please tell me ;)


-- 
regards, TR


pgpdkxUddvyvg.pgp
Description: PGP signature


[squid-users] Regular Expression Content Changes

2006-09-27 Thread Rob Gunther

I would like to use squid for a project I'm working on.

What I basically want to do is have all HTML pages that are pulled
through squid have some search & replace filters run on them before
being fed back to the client and stored in the cache.

I skimmed the manual, and see there are some plugins to do this to
actual URL's themselves but does anyone have a suggestion how this
could be done on actual HTML content?

Thanks!