Rewrite with Query-String parameter

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 4
Joined: 23 Jun 2014, 07:00

Rewrite with Query-String parameter

05 Jul 2014, 17:01

Hi there,

I can't get a simple rule working :oops:
I want to rewrite this...
http://dummy.de/Arzt/Hamburg/Meier/336181?beaf33ec5a9da9e56a1db7a8f3cd13f6
to...
http://dummy.de/RealPath/index.plx?id=336181&sid=beaf33ec5a9da9e56a1db7a8f3cd13f6

I tried this rule:
RewriteRule Arzt/.*/(\d+)?(.*) RealPath/index.plx?id=$1&sid=$2 [NC]
which works fine at all but it is missing the sid. The problem seems to be the ? but I can't get it working.

Thanks for any help

Stefan

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Rewrite with Query-String parameter

07 Jul 2014, 00:01

Hello,

Please, try the following:
Code: Select all
RewriteCond %{QUERY_STRING} ^(.+)$
RewriteRule Arzt/[^/]+/[^/]+/(\d+)$ RealPath/index.plx?id=$1&sid=%1? [NC]


Regards

User avatar
Posts: 4
Joined: 23 Jun 2014, 07:00

Re: Rewrite with Query-String parameter

07 Jul 2014, 08:03

It works :D
Thanks for the support... you made my day

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 0 guests