I have a simple question that I don’t know the answer and difficult to explain in a single title.
Imagine I have this server :
HOME
-- SITE1
---- CSS
------ style.css
---- IMG
-- SITE2
---- CSS
---- PHP
------ index.php
Now, imagine I own example.com and this point to HOME/SITE1, so:
www.example.com/CSS/style.css
will open the css file, but there is a way to go back to home/ and then go to HOME/SITE2 using the domaine example.com ? For example example.com/../SITE2/PHP/index.php ?
I ask this to know if it’s secure to get personnal files on my webserver to use it as a cloud for my videos, as I have “unlimited disk space”,
Thanks in advance
1
You can use absolute or relative urls (to the base
html element if set; otherwise it’s relatively to current url) to navigate your directory tree. In this case ../../SITE2/PHP/index.php
if you are trying to reference it from style.css.
Web servers are usually configured with a document root per site to disallow navigation between sites. With the Apache web server this directive is called DocumentRoot
.