Page with variable in URL and "+" character


I have a page that accepts a variable in the URL. Everything works as long as the variable does not have the + sign.

I tried the following urls:

Result : error 404…

Surprisingly, * sign works with this URL: https://myserver/sms/send/*33123456789

Here is my code :

New-UDPage -Url "/sms/send/:To" -Title "Envoyer un SMS" -AuthorizationPolicy "Send SMS" -Endpoint { 
param ($To) 

    .... CODE ....

I wanted to say, Surprisingly, * sign works with this URL: https://myserver/sms/send/%2A33123456789

Problem solved.

I am under IIS. Everything works, after modifying the web.config file and adding the following line :

  <requestFiltering allowDoubleEscaping="true"/>
1 Like