HTML root folder?

Is there a way to redirect a URL, such as the location of the image to the root folder and then to the directory.

I am currently using "../" to return folders, but this is annoying if you have a complex directory tree.

thank

+5
source share
4 answers

This is just one character:

/

For instance:

/image.jpg

any page you put it on belongs to the same root_folder / image.jpg file

+9
source

<base> URL-, URL- . / , <base> , "" . .. example.com/mysite/index.html vs. example.com

https://developer.mozilla.org/en-US/docs/HTML/Element/base

+3

You can simply use the full URL, for example:

http://domain.com/file_in_root_folder.jpg

or absolute paths

/file_in_root_folder.jpg
+1
source

you can use static addressing that starts with http: // and for relational addressing you can use your address with / for example: /foo/bar.jpg

0
source

All Articles