I'm using Apache to remotely access an html page, I've replaced the index.html file that is in the /var/www/html
folder with a file that asks for authentication and redirects the page to a another file .html.
window.location.replace('../ControlCenter/index2.html');
The file index2.html is located in /var/www/ControlCenter
, I am using the following command to go back a directory and access its (../ControlCenter/index2.html)
file, but when testing in browser I can not access file, because it accuses the error
404 not found
Does anyone know how it is possible from the html file that I access with myip: 80 access other files on my computer without them being in the same folder!
If I put all the files in the same folder (.../var/www/html)
I can move from one to another without problem, but what happens is that instead of directly accessing the index.html
file the list of files in the folder appears to select which one I want to run and you lose the part of only accessing the other files after you validate the authentication.
edit: I have been able to solve the problem by temporarily renaming the file as index.html , so I have all the necessary files in the same folder and when I log in through the browser I go directly to the authentication file! A new problem has arisen, how do I get access outside my network, I've read somewhere that I have to change some permissions, but I do not know what or where, does anyone know what to change or where can I find a tutorial how?