Unwanted forwrad slash in query string
Posted: Wed Sep 02, 2009 6:39 am
Here's something that's really bugging me.
First, a basic URL link in php:
echo "<a href=\"http://www.googlecom\">Google</a>";
OK, that works fine.
Now, I try to extend the URL by adding a query string:
echo "<a href=\"http://www.google.com?id=1066\">Google</a>";
But the result is not what I expected. Even though the source code in the resulting page is correctly displayed as:
<a href="http://www.google.com?id=1066">Google</a>
The ACTUAL address which the browser tries to find is:
http://www.google.com/?id=1066
So where did that forward slash come from??? Any ideas?
First, a basic URL link in php:
echo "<a href=\"http://www.googlecom\">Google</a>";
OK, that works fine.
Now, I try to extend the URL by adding a query string:
echo "<a href=\"http://www.google.com?id=1066\">Google</a>";
But the result is not what I expected. Even though the source code in the resulting page is correctly displayed as:
<a href="http://www.google.com?id=1066">Google</a>
The ACTUAL address which the browser tries to find is:
http://www.google.com/?id=1066
So where did that forward slash come from??? Any ideas?