Quantcast
Channel: Configuration & Scripting
Viewing all articles
Browse latest Browse all 780

How to remove spaces from end of URL?

$
0
0

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?


Viewing all articles
Browse latest Browse all 780

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>