Take the 2-minute tour ×

How can I remove the trailing space with IIS7 and the URL rewrite module

share|improve this question

1 Answer 1

Check this out: http://blogs.iis.net/ruslany/archive/2009/04/08/10-url-rewriting-tips-and-tricks.aspx

Basically match on (.*)/$ and do a permanent redirect to {R:1}

share|improve this answer
That is for a trailing / not a space...I tried using that rule and using and actual space and %20 neither worked –  Adam Jun 1 '12 at 14:27
Sorry! My bad, totally thought I knew what your question was without actually reading it properly! Can I ask why you'd want to remove a trailing space? Do you have inbound links like yoururl.com/stuff%20? –  greg84 Jun 1 '12 at 14:33
A partner linked to us with a trailing space and I need to remove it because it doesn't work! –  Adam Jun 1 '12 at 14:42
You might have to create your own provider: learn.iis.net/page.aspx/804/… –  greg84 Jun 1 '12 at 23:16

Your Answer


