Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link Question 1

Status
Not open for further replies.

carlg

Programmer
Jun 23, 2004
88
US
I should really know the answer to this but for some reason my mind is drawing blank.

I have a PHP page with a link in it.

Let's say

<A HREF=" here</A>

When I click the link it is looking for the following page
<MY DOC ROOT>/ which does not exist

How do I get this to work and go to google?

Thanks for the help
 
Add http:// to the link like so:

<a href="[red]http://[/red]
In most webservers anything that does not start with http:// is assumed to be local to the server. So ti looks in your document root for it.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Forgot to mention that if you have a file named "[red]www.google.com[/red]" in your doc root. The link you posted will open that file.


----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top