I have some urls formed like in my router mapping
/section/{{some_section_name}}
/topic/{{some_topic_name}}
Now I am thinking to convert the section into shorted by
/!{{some_section_name}} to avoid the explicit spelling of /section
Similarly I would like to use
/@{{some_topic_name}} instead of /topic/{{some_topic_name}}
I believe that browser shall not encode these characters by its own. Is it OK to use ! and @ symbols in the route as mentioned above? Please give me side effects using such a conventions in the web.
The
@character has special meaning on a URL – it is a separator between the (optional) username/password and the host name:See section 3.1 of RFC 1738.
So, though not strictly a problem for MVC as such, it is more of an issue with the URL schema.
For HTTP there is no such restriction on the
!character. The allowed characters are listed in the RFC linked above.