Re: using RedirectMatch and regular expressions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 24, 2015 at 7:48 AM, Meedendorp, Bert
<Bert.Meedendorp@xxxxxxxxxxx> 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://<host/IP> 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-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux