Redirecting to a different page in different folder
Describe the problem hey i have two folders inside file call " Pages " first folder call WelcomePage which have html file and css and the different page call MainPage which have the same html file and css so i was trying to redirecting from WelcomePage folder into MainPage it says " Error: 404 Not Found Sorry, the requested URL 'http://localhost:8000/Pages/MainPage/index.html' caused an error: File does not exist. " i tried on live server extension it worked prefectily is this kinda bug or what? thank you!
import eel
import eel
eel.init('Pages/WelcomePage')
eel.start('index.html')
...
<html>
<button onclick="window.location.href = '../MainPage/index.html'>SecondPage</button>
</html>
second html
<html>
<p> hello world </p>
</html>
You've told Eel that the root path for your HTML files is Pages/WelcomePage, so I don't think it likes you navigating up beyond that directory.
If you change it to the following it should be OK:
eel.init('Pages')
eel.start('WelcomePage/index.html')
Yeah it worked thank you! @samuelhwilliams