[users@httpd] Re: using RedirectMatch and regular expressions

2015-06-24 Thread 吴昊
and please note that "word character"always matches the ASCII characters 
[A-Za-z0-9_].

in your example, before BSL01 is a 7, a word character, and followed by another 
word character B, which is not qualified as word boundary before B according 
rule #3.

Tks & b.rgds
--
Chris

发件人: 吴昊
发送时间: Wednesday, June 24, 2015 3:35 PM
收件人: users@httpd.apache.org
主题: Re: using RedirectMatch and regular expressions

I think the problem is \b

“There are three different positions that qualify as word boundaries:
Before the first character in the string, if the first character is a word 
character.
After the last character in the string, if the last character is a word 
character.
Between two characters in the string, where one is a word character and the 
other is not a word character.”


Tks & b.rgds
--
Chris

发件人: Meedendorp, Bert [mailto:bert.meedend...@kadaster.nl]
发送时间: Wednesday, June 24, 2015 1:48 PM
收件人: users@httpd.apache.org
主题: [users@httpd] using RedirectMatch and regular expressions


Hello,



I'm using apache webserver for implementing virtual hosts.

I want support on using RedirectMatch in combination with regular expressions.

I want to redirect an incoming url with specific information to redirect to a 
local file.

I'm trying the next line:



RedirectMatch 
/sap/opu/odata/sap/ZVPOSTREAD_SRV/AktepostSet(.*(\bBSL01\b).*)
http://10.103.140.62/BSL01_X_1197.json ( This gives no 
match !? )



The incoming url looks like:

http://10.103.140.62:80/sap/opu/odata/sap/ZVPOSTREAD_SRV/AktepostSet?$filter=Gemeentecode%20eq%20%27BSL01%27%20and%20Sectie%20eq%20%27X%27%20and%20Perceelsnummer%20eq%20%2701197%27&$format=json

and I want to check on the word BSL01





With kind regards,





Bert



Disclaimer:
De inhoud van dit bericht is uitsluitend bestemd voor geadresseerde.
Gebruik van de inhoud van dit bericht door anderen zonder toestemming van het 
Kadaster
is onrechtmatig. Mocht dit bericht ten onrechte bij u terecht komen, dan 
verzoeken wij u
dit direct te melden aan de verzender en het bericht te vernietigen.
Aan de inhoud van dit bericht kunnen geen rechten worden ontleend.

Disclaimer:
The content of this message is meant to be received by the addressee only.
Use of the content of this message by anyone other than the addressee without 
the consent
of the Kadaster is unlawful. If you have received this message, but are not the 
addressee,
please contact the sender immediately and destroy the message.
No rights can be derived from the content of this message.


[users@httpd] RE: using RedirectMatch and regular expressions

2015-06-24 Thread Meedendorp, Bert
Hello Chris,

Thanks for your quick reply.
I’ll understand what you mean. The \b can’t be used in this situation.

Do you have any suggestion what I should use in this case?


With kind regards,

Bert

Van: 吴昊 [mailto:wu...@7500.com.cn]
Verzonden: woensdag 24 juni 2015 9:54
Aan: users@httpd.apache.org
Onderwerp: [users@httpd] Re: using RedirectMatch and regular expressions

and please note that "word character"always matches the ASCII characters 
[A-Za-z0-9_].

in your example, before BSL01 is a 7, a word character, and followed by another 
word character B, which is not qualified as word boundary before B according 
rule #3.

Tks & b.rgds
--
Chris

发件人: 吴昊
发送时间: Wednesday, June 24, 2015 3:35 PM
收件人: users@httpd.apache.org
主题: Re: using RedirectMatch and regular expressions

I think the problem is \b

“There are three different positions that qualify as word boundaries:
Before the first character in the string, if the first character is a word 
character.
After the last character in the string, if the last character is a word 
character.
Between two characters in the string, where one is a word character and the 
other is not a word character.”


Tks & b.rgds
--
Chris

发件人: Meedendorp, Bert [mailto:bert.meedend...@kadaster.nl]
发送时间: Wednesday, June 24, 2015 1:48 PM
收件人: users@httpd.apache.org
主题: [users@httpd] using RedirectMatch and regular expressions


Hello,



I'm using apache webserver for implementing virtual hosts.

I want support on using RedirectMatch in combination with regular expressions.

I want to redirect an incoming url with specific information to redirect to a 
local file.

I'm trying the next line:



RedirectMatch 
/sap/opu/odata/sap/ZVPOSTREAD_SRV/AktepostSet(.*(\bBSL01\b).*)
http://10.103.140.62/BSL01_X_1197.json ( This gives no 
match !? )



The incoming url looks like:

http://10.103.140.62:80/sap/opu/odata/sap/ZVPOSTREAD_SRV/AktepostSet?$filter=Gemeentecode%20eq%20%27BSL01%27%20and%20Sectie%20eq%20%27X%27%20and%20Perceelsnummer%20eq%20%2701197%27&$format=json

and I want to check on the word BSL01





With kind regards,





Bert



Disclaimer:
De inhoud van dit bericht is uitsluitend bestemd voor geadresseerde.
Gebruik van de inhoud van dit bericht door anderen zonder toestemming van het 
Kadaster
is onrechtmatig. Mocht dit bericht ten onrechte bij u terecht komen, dan 
verzoeken wij u
dit direct te melden aan de verzender en het bericht te vernietigen.
Aan de inhoud van dit bericht kunnen geen rechten worden ontleend.

Disclaimer:
The content of this message is meant to be received by the addressee only.
Use of the content of this message by anyone other than the addressee without 
the consent
of the Kadaster is unlawful. If you have received this message, but are not the 
addressee,
please contact the sender immediately and destroy the message.
No rights can be derived from the content of this message.


Disclaimer:
De inhoud van dit bericht is uitsluitend bestemd voor geadresseerde.
Gebruik van de inhoud van dit bericht door anderen zonder toestemming van het 
Kadaster
is onrechtmatig. Mocht dit bericht ten onrechte bij u terecht komen, dan 
verzoeken wij u
dit direct te melden aan de verzender en het bericht te vernietigen.
Aan de inhoud van dit bericht kunnen geen rechten worden ontleend.

Disclaimer:
The content of this message is meant to be received by the addressee only.
Use of the content of this message by anyone other than the addressee without 
the consent
of the Kadaster is unlawful. If you have received this message, but are not the 
addressee,
please contact the sender immediately and destroy the message.
No rights can be derived from the content of this message.


Re: [users@httpd] using RedirectMatch and regular expressions

2015-06-24 Thread Yann Ylavic
On Wed, Jun 24, 2015 at 7:48 AM, Meedendorp, Bert
 wrote:
>
> I'm trying the next line:
> RedirectMatch 
> /sap/opu/odata/sap/ZVPOSTREAD_SRV/AktepostSet(.*(\bBSL01\b).*) 
> http://10.103.140.62/BSL01_X_1197.json
> ( This gives no match !? )
>
> The incoming url looks like:
>
> http://10.103.140.62:80/sap/opu/odata/sap/ZVPOSTREAD_SRV/AktepostSet?$filter=Gemeentecode%20eq%20%27BSL01%27%20and%20Sectie%20eq%20%27X%27%20and%20Perceelsnummer%20eq%20%2701197%27&$format=json
>
> and I want to check on the word BSL01

RedirectMatch does not match the query-string, you must use mod_rewrite instead.
Something like:

RewriteEngine on
RewriteCond %{QUERY_STRING} ^.*%27(BSL01)%27.*$
RewriteRule ^/sap/opu/odata/sap/ZVPOSTREAD_SRV/AktepostSet$
http://10.103.140.62/%1_X_1197.json? [R]

(You may also omit the http:// and [R] parts to use an
internal redirection instead, since the redirection seems to be on the
same host/IP).

Regards,
Yann.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] httxt2dbm - DB file not completely rewritten

2015-06-24 Thread Antoine Prevosto
Finally, I found that an issue was raised :

Bug 51372 httxt2dbm does not remove map entries


It was solved by a documentation update in Apache trunk.

As a matter of fact, the Apache 2.4 documentation says :

If the output file already exists, it will not be truncated. New keys will
> be added and existing keys will be updated.


Apache 2.2 documentation was not updated yet.


2015-06-23 15:10 GMT+02:00 Antoine Prevosto :

> Hi Rainer,
>
> I have the same issue ... 5 years later ;) with Apache 2.2.22, and even
> with Apache 2.4.10.
>
> Did you get an explanation (or I will raise an issue).
>
> Thanks
> Antoine.
>
> 2010-04-01 13:32 GMT+02:00 Rainer Frey :
>
>> I use DBM rewrite maps (apache 2.2.9 - package 2.2.9-10+lenny6) on debian
>> 5
>> with BerkeleyDB 4.6 (package 4.6.21-11). I generate the DB files with
>> makefiles that call httxt2dbm on potentially already existing DB files.
>>
>> When entries are added to the source files, it works fine. But when
>> entries
>> are deleted from the source files, the DB files still contain the entries
>> and
>> lookup succeeds (and yes, I verified that the DB file is indeed updated).I
>> also grepped the db file for the key to verify that it is indeed in the
>> file
>> (and not a cached result in apache).
>>
>> Is this a bug in httxt2dbm, or is my expectation wrong? Thanks for any
>> comments!
>>
>> Rainer
>>
>>
>>
>> -
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>>"   from the digest: users-digest-unsubscr...@httpd.apache.org
>> For additional commands, e-mail: users-h...@httpd.apache.org
>>
>>
>