When building a static HTML site, you can set the base url like so <base url="http://localhost:8888/mysite" />
. Supposedly when you insert, say, an image, you can do so from that base url like so <img src="/img/logo.png" />
, which is equivalent to <img src="http://localhost:8888/mysite/img/logo.png" />
My problem is that these relative links don't work when I move the site around, which is a pain because I'm trying to share it with someone on Dropbox. I thought I could just chage the base url to <base url="http://dl.dropbox.com/u/xxxxxxxx/mysite" />
, but the image links are looking here: <img src="http://dl.dropbox.com/img/logo.png" />
instead of the full base URL I set in the head.
Why is this?
<base url
thing and just move the main folder...? (since it's not a dynamic site, I don't get it... your base url is the one where your current file resides...) – Sentimenthttp://localhost/assets/img
. It should be something like~/Desktop/website_folder/assets/img
. – Azotize/assets/img/foo.png
. If I treat each page as its own base, I'll have to create relative links and have to worry about this situation:../../../../../assets/img/foo.png
. – Azotize