ISAPI Rewrite Special Characters

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
Posts: 5
Joined: 06 Jun 2012, 04:57

ISAPI Rewrite Special Characters

23 Mar 2013, 07:33

Hi
I am having a problem in a url, when i am trying to access i am getting a message

A potentially dangerous Request.Path value was detected from the client (<).

This is the current url

http://www.abc.com/%3C%25=sSiteURL%25%3EDirectory1/Directory2/Directory3/Directory4/FinalDirectory/1883.htm

I want to remove
%3C%25=sSiteURL%25%3E (This String)


I want the url to be like this
http://www.abc.com/Directory1/Directory2/Directory3/Directory4/FinalDirectory/1883.htm

Can anyone please help me in sorting this out

Thanks

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

Re: ISAPI Rewrite Special Characters

24 Mar 2013, 20:14

Hello,

Do you want this rule to be generic and handle more than 1 URL, or is it supposed to be a single-url rule.

Regards
Andrew

Posts: 5
Joined: 06 Jun 2012, 04:57

Re: ISAPI Rewrite Special Characters

25 Mar 2013, 04:49

Hi
I want this rule to be generic and handle more than 1 url's

You help would be much more appreciated

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

Re: ISAPI Rewrite Special Characters

25 Mar 2013, 11:18

Hello,

Lets try with the following:

Code: Select all
RewriteEngine on
RewriteBase /

RewriteCond %{HTTP:Host} ^www\.abc\.com$ [NC]
RewriteRule \<\%=sSiteURL\%\>(.*) /$1 [NC,R=301,L]


You may need to try using NE or NU flag for this rule, in addition to NC,R=301, and L.

Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 21 guests