I am confused about encoded URLs.
For example, when I write my browser:
stackoverflow.com/questions
I can successfully view the page.
However, when I write:
stackoverflow.com%2Fquestions
I am unable to view.
Since %2F means “/”, I want to understand why this does not work properly.
The reason why I want to find out is that I am getting an encoded URL and I don’t know how I can decode that URL right after I receive it in order not to have an error page.
The
/is one of thepercent-encoding reserved characters. URLs usepercent-encoding reserved charactersfor defining their syntax. Only when these characters are not used in their special role inside a URL, they need to be encoded.Percent-encoding reserved characters: