SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard Busch's Avatar
    Join Date
    Jan 2004
    Posts
    1,072
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Relative Addresses and Subdomains

    I am making a site for a client and he has requested that the site be broken up into 3 subdomains. But the pages in each subdomain use many of the same images. I would like to put all images that are used more than once in one folder and call them from all the subdomains. This is easy if i use the absolute addresses in the <img> tag but I would prefer to use a relative address.

    Any ideas how i can access the same images from different subdomains?

    busch

  2. #2
    SitePoint Guru DCS's Avatar
    Join Date
    Apr 2002
    Location
    Arkansas
    Posts
    809
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    add the sub-domain to your path

  3. #3
    SitePoint Wizard Busch's Avatar
    Join Date
    Jan 2004
    Posts
    1,072
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can you give me an example of what you are talking about?
    thanks
    busch

  4. #4
    SitePoint Guru DCS's Avatar
    Join Date
    Apr 2002
    Location
    Arkansas
    Posts
    809
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    say you have a folder called photos
    Normally it would be like this:
    http://www.yoursite.com/photos/photo1.jpg

    Add in a sub-domain and you go to this:
    http://www.yoursite.com/subdomain/photos/photo1.jpg
    this assumes you create a photos folder on your subdomain

  5. #5
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or you could use site root relative, i.e., /path_to_images/bgimage.gif

    The above path is valid on any page where the web server is live.
    Ryan Butler

    Midwest Web Design


Bookmarks

Posting Permissions

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