You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by 吴昊 <wu...@7500.com.cn> on 2015/06/24 09:54:20 UTC
[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.Meedendorp@kadaster.nl]
发送时间: Wednesday, June 24, 2015 1:48 PM
收件人: users@httpd.apache.org<ma...@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
Posted by "Meedendorp, Bert" <Be...@kadaster.nl>.
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:wuhao@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<ma...@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.Meedendorp@kadaster.nl]
发送时间: Wednesday, June 24, 2015 1:48 PM
收件人: users@httpd.apache.org<ma...@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.