Help with rewriting a querystring

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 1
Joined: 16 Oct 2013, 19:35

Help with rewriting a querystring

16 Oct 2013, 19:40

Hello,

We have some incoming links pointing to:

http://www.mysite.com/Thumbnail.asp?Ima ... false&WM=T

How do we rewrite it to become:

http://www.mysite.com/showThumb.aspx?Im ... ype=medium

Basically we just need to put the Imagename from querystring and remove the ".." if in the querystring value.

Thank you for any help provided.

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

Re: Help with rewriting a querystring

17 Oct 2013, 16:59

Hello,

Lets try to use:

Code: Select all
RewriteEngine on
RewriteBase /

RewriteCond %{QUERY_STRING} ^Image=(?:\.\.)?([^&]+)&.*$ [NC]
RewriteRule ^Thumbnail\.asp$ /showThumb.aspx?Image=%1&iType=medium? [NC,R=301,L]


Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 15 guests