Remove characters from URL

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 41
Joined: 25 May 2012, 17:31

Remove characters from URL

13 Feb 2014, 12:25

Hello,

I want to rewrite this request:

http://mysite.com/webpage.aspx%20

to

http://mysite.com/webpage.aspx

I tried the code below but this did not do the trick.

RewriteRule webpage.aspx%20 webpage.aspx [NC,R=301]

Is this possible?

User avatar
Posts: 41
Joined: 25 May 2012, 17:31

Re: Remove characters from URL

13 Feb 2014, 17:02

I figured this out on someone else's post. Basically since the %20 is padding from a space in the URL, I was able to escape the space and it works. Here is what I did:

RewriteRule webpage.aspx/ webpage.aspx [NC,R=301]


I added a "/ "

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 0 guests