SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Base url

  1. #1
    SitePoint Evangelist silversurfer5150's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Base url

    Hey there,

    I was just reading the w3 schools definition of what base url does. I can see that if you specify an absolute path for your images in the base url (eg.<base href="http://www.w3schools.com/images/" />), all you need to do is reference the image filename and the baseurl will complete the filepath to your images for you.What I want to know is, can you override that by specifying an absolute path in order to reference a file or indeed page from elsewhere?
    thanks
    Silversurfer

  2. #2
    SitePoint Addict AtSea webdesign's Avatar
    Join Date
    May 2010
    Location
    Newark, Delaware
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    are you asking that you want to use another absolute path outside your server for a page?

    I don't use base href anymore (I setup absolute paths via my htaccess file) so not sure if it would affect your link if you added an absolute path there.

    I do know however it does work correctly via htaccess.

    For example I have all of my site links to preface with http://www.atseadesign. The URL part of my image or link then has /directory/file.

    But in other areas of my site I use an absolute path without any problems. i.e. http://twitter.com/blahblah

    I guess the best way to see if it works is throw it in there and try it.


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
  •