Results 1 to 8 of 8
  1. #1
    captain obvious Lurker's Avatar
    Join Date
    Jul 2005
    Location
    Visalia, Ca
    Posts
    2,316

    html, website, code help?

    I have linking on a website I do setup like this:
    <a href="applications.php"
    I believe that is called absolute linking? Anyways It is setup so that it doesn't matter where the directories are as long as they retain their current structure.

    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"
    Of course I removed the real IP address.

    Without changing all of my links on the website to
    <a href="http://WEB SITE/applications.php"
    How can I change it so that the link stays absolute. I hate the fact that my web address changes to the IP in the browser window.

    This happens in both IE and firefox


  2. #2
    06Busa's Avatar
    Join Date
    Aug 2005
    Location
    Joliet,IL
    Posts
    193
    I'm just learing about moding my ride. And you lost me when you started talking about Vodka.

  3. #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.

  4. #4
    captain obvious Lurker's Avatar
    Join Date
    Jul 2005
    Location
    Visalia, Ca
    Posts
    2,316
    Thanks superjet.

    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

  5. #5
    Quote Originally Posted by _Lurker_
    Thanks superjet.

    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
    That sounds like it may be a dns issue. Is the domain name forwarded instead of being pointed to a nameserver?

  6. #6
    captain obvious Lurker's Avatar
    Join Date
    Jul 2005
    Location
    Visalia, Ca
    Posts
    2,316
    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.

  7. #7
    Quote Originally Posted by _Lurker_
    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.
    pm me the domain name and I'll see if i can figure out what's going on.

    Or, do some testing on dnsstuff.com as that will tell you a lot.

  8. #8
    Moderator RX951's Avatar
    Join Date
    Apr 2005
    Location
    League City, Texas
    Posts
    16,066
    +1
    23
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Code help 02 Honda Turbo
    By water worx in forum Honda How To & FAQs
    Replies: 2
    Last Post: 02-19-2008, 09:00 PM
  2. Hello > code help please
    By emailderek1 in forum Polaris Open Discussion
    Replies: 21
    Last Post: 01-25-2008, 06:05 AM
  3. Hello > code help Please
    By emailderek1 in forum Kawasaki Open Discussion
    Replies: 1
    Last Post: 01-04-2008, 10:42 PM
  4. Virage 800di - Get Trouble codes? Help IDing part
    By cgustafs in forum Polaris Open Discussion
    Replies: 2
    Last Post: 06-11-2007, 09:09 PM
  5. Check engine light! Not pulling a code... HELP!!
    By Venator in forum 4-Tec Performance
    Replies: 10
    Last Post: 12-10-2006, 07:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •