I’m just stumped and am not sure what’s going on. I’m also having a hard time researching the issue because I don’t exactly know how to ask the right question. This should be an easy question for any of you, but your answer would be so immensely appreciated!
I have an asp.net page with the following element:
<a href="http://www.mysite.com?id=1">Link</a>
Great.
But when I hover over the link on the output page, something happens with ASP and that link will navigate to this url: http://www.mysite.com/?id=1
It adds that extra “/” before the query string. How can I get around this? It is not intuitive to my why this is happening. Is this a web.config issue? It happens even if I just start a new project, create a new page, and put that one element there.
Thanks so much!
And it seems to happen on various browsers.
That slash is necessary, the querystring cannot immediately follow the domain. See http://en.wikipedia.org/wiki/URL#Syntax
Your particular URL is omitting the path, but you cannot omit the slash between the domain and path, unless nothing else follows the domain.