Reputation: 12583
Say I have this url "/my#stuff"
I am using asp.net mvc and when I try to goto this page it takes me to just "/my". The "#stuff" part has been removed.
Now I can get it to work fine if I encode the URL like so "/my%23stuff" since %23 decodes to #
However, is there a way I can get this to work without having to encode the url?
I'd like it if typing in "/my#stuff" as the URL worked just the same as "my%23stuff"
Upvotes: 0
Views: 289
Reputation: 5080
I don't think there is a way to do what you are saying. The hash is used in a URL for anchor tags.
You are pointing at a page /my and navigating to anchor tag "stuff" on that page. If anchor tag "stuff" does not exist it will just navigate to page /my.
Upvotes: 3