Thread: html, website, code help?
09-08-2006, 03:21 PM #1
html, website, code help?
I have linking on a website I do setup like this:
When I click on a link such as the one above the links on my page all change to
<a href="http://IP ADDRESS/applications.php"
Without changing all of my links on the website to
<a href="http://WEB SITE/applications.php"
This happens in both IE and firefox
09-08-2006, 11:00 PM #2
I'm just learing about moding my ride. And you lost me when you started talking about Vodka.
09-08-2006, 11:22 PM #3
That is a relative link, meaning it will look for applications.php in the current directory, no matter what server you put it on. Just code it in html that way and you're set. When the browser gets it, it will add the current directory on the front to make the full link.
Here's an example:
On x-h2o, our true domain name is x-h2o.com (with the letter o), but we have the misspelling x-h20.com (with a zero) pointing to the same server. All the links on vbulletin are relative, so if you click on private messages, you'll load the page private.php but depending on which domain name you came in on, it will be either www.x-h2o.com/private.php or www.x-h20.com/private.php However, a few pages are domain name sensitive, so I have them hard-coded to be http://x-h2o.com/page.php so it will make the browser load the correct domain name.
It sounds like you have it correct, but the browser is adding on the rest of the link so it's confusing you into thinking that the link has changed.
09-09-2006, 10:19 AM #4
I just don't like it showing the IP address because this is a company website and it looks weird to the average person when the companies address they originally went to is now a bunch of numbers.
Itís an aesthetic thing
09-09-2006, 10:27 AM #5Originally Posted by _Lurker_
09-09-2006, 01:35 PM #6
Nope it is pointed to a name server. I pay extra for a static IP from my host, so the problem probably lies somewhere there. Before I had a dynamic IP and this problem wasn't happening.
09-09-2006, 01:58 PM #7Originally Posted by _Lurker_
Or, do some testing on dnsstuff.com as that will tell you a lot.
09-09-2006, 02:31 PM #8
There are basically three types of hyperlinks: relative, absolute, and virtual.
RELATIVE: Code:<a href="../default.asp">Home</a>
ABSOLUTE: Code:<a href="http://www.example.com/default.asp">Home</a>
VIRTUAL: Code:<a href="/default.asp">Home</a>
There are benefits to using each one. Relative links are just that - they rely on the path of the file they are located in. For example, in the example above, Home would be in a folder off of the root web and clicking on it would take you to the home page.
Absolute links do not relate to the path of the file they are in. Instead - clicking on the example link you take you directly to the page - no matter what file it is placed in.
Virtual links are similar to relative links - they rely on the path of the file to one extent: they actually go back to the root and then over. So in the example above, the code could be placed in any folder on the web site and it will take you back to the home page.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By water worx in forum Honda How To & FAQsReplies: 2Last Post: 02-19-2008, 09:00 PM
By emailderek1 in forum Polaris Open DiscussionReplies: 21Last Post: 01-25-2008, 06:05 AM
By emailderek1 in forum Kawasaki Open DiscussionReplies: 1Last Post: 01-04-2008, 10:42 PM
By cgustafs in forum Polaris Open DiscussionReplies: 2Last Post: 06-11-2007, 09:09 PM
By Venator in forum 4-Tec PerformanceReplies: 10Last Post: 12-10-2006, 07:58 PM