Announcement

Collapse
No announcement yet.

Pictures won't display on company website only

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Pictures won't display on company website only

    After a new install of Win 2003 Server, and adding an A (Host) record for the external ip address of the company website, when browsing to the site from inside the network, the pictures wont display in IE. Would it be because the Base Reference on the page is HTTP://mydomain.com instead of www.mydomain.com like the host record states? All other websites display perfectly.

  • #2
    Re: Pictures won't display on company website only

    Originally posted by d_weller
    After a new install of Win 2003 Server, and adding an A (Host) record for the external ip address of the company website, when browsing to the site from inside the network, the pictures wont display in IE. Would it be because the Base Reference on the page is HTTP://mydomain.com instead of www.mydomain.com like the host record states? All other websites display perfectly.
    If the site used a relative instead of absolute path to the images you probably wouldn't have this problem. Anyway to check if you're not resolving the address for yourdomain.com use nslookup for that domain. If you're unable to resolve it do the following...

    Create a CName (yourdomain.com) point it to (www.yourdomain.com). If I were you I'd do it the otherway around because imo it makes more sense (CName->A Record).

    Create an A Record (yourdomain.com), create a CName (www.yourdomain.com) point it to (yourdomain.com)
    Andrew

    ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

    Comment


    • #3
      I would rather not convolute the DNS server. By "relative" URL do you mean ./ instead of HTTP:// ?

      Comment


      • #4
        Yes...

        for example img path in HTML
        (absolute) "http://www.yourdomain.com/images/filename.gif"
        (relative) "images/filename.gif"

        Assuming the page in question is in the ROOT and the structure is:
        ROOT
        _|____main.htm
        _|____images (folder)
        ______|____filename.gif
        Andrew

        ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

        Comment


        • #5
          The way you described is the way they are set up. However, at the top of the page there is a statement <base href="http://mydomain.com/"> . should this be relative or absolute. The reason why I ask is because the website comes up just fine if I browse to it from outside the network.

          Comment


          • #6
            Originally posted by d_weller
            The way you described is the way they are set up. However, at the top of the page there is a statement <base href="http://mydomain.com/"> . should this be relative or absolute. The reason why I ask is because the website comes up just fine if I browse to it from outside the network.
            That is why its not working. A base href specifies the starting poing for all relative URL's in the page, no matter if that relative URL is for a link or an image tag or anything.
            Andrew

            ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

            Comment


            • #7
              So the correct statement should be <base href="./"> Is this correct?

              Comment


              • #8
                Originally posted by d_weller
                So the correct statement should be <base href="./"> Is this correct?
                Just comment the tag out. When using relative pathing it automatically assumes "./" for the current directory.

                I'd do the following:

                Code:
                <!-- ***Removed by d_weller***
                <base href="http://yourdomain.com">
                -->
                Andrew

                ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

                Comment

                Working...
                X