I have many external links on the website:
wwww.domain.com/folder/%20
(users posts on a third-party sites links with a space at the end).
On similar address server responds with 404 error.
How to do a redirect (IIS Rewrite) to the same URL but without the space at the end?
wwww.domain.com/folder/%20 -> wwww.domain.com/folder/
I tried this:
<rule name="No-White-Space-In-End" stopProcessing="true"><match url="(.*)(%20+)$" /><action type="Redirect" url="{R:1}" /></rule>
This not work.
I looked in the server logs and found there is a plus (+) on the end of url instead %20.
But so, too, does not work:
<rule name="No-White-Space-In-End" stopProcessing="true"><match url="(.*)(\++)$" /><action type="Redirect" url="{R:1}" /></rule>
How cut whitespace from and of url?