Is there a way to direct a url such as an image location to your root folder and then into a directory from there.
Currently i am using "../" to go back folders but this gets annoying if you have a complex directory tree.
Thanks
It is just a single character:
/
For example:
/image.jpg
whatever page you put it in, it refers to the same file, root_folder/image.jpg
You can also use <base>
to set the base url all urls should be relative to. In general using an absolute path with /
is probably prefereable, but <base>
may be useful if you have the "root" of your page not on the root of the domain. I.E. example.com/mysite/index.html
vs. example.com
https://developer.mozilla.org/en-US/docs/HTML/Element/base
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With