Forums

Flask 404 Not Found error when trying to access sublinks within my site

Hello there, thanks for taking the time to read and give any input you might have,

Basically, I'm trying to access a link on my site at zonesfordrones.com/laws, and the routing seems to be broken. Using just the domain to access the index.html page does however work. Since that worked I have tried to load the index.html page from the /laws link to see if the html was the issue, but that returns the same error. I'm wondering if this has something to do with the DNS configuration I have, or possible something to do with needing to configure WSGI or even just something I'm doing wrong within flask itself. More info including most of the source code for my problem can be found on stackoverflow where I tried to ask first, here: stackoverflow thread.

Thanks for any input anyone may have and let me know if you need any more info, Torrey

If you're getting a 404 for a page, then you haven't set up a route for the URL or you've set it up incorrectly. Have a look at the docs for your framework about how to configure routes.

Your SO link links back to this forum page.

Sorry about that, looks like paste went off twice when I was posting the link. I went ahead and edited it.

Anyways, I had contacted your guys' support last night as well as posting here and they let me know that I hadn't reloaded my site in a couple weeks now... Needless to say I feel like an idiot. Turns out that you have to click the "reload site" button on the web app page for changes in the Flask python file to propagate. I had no idea this was the case since I hadn't done any changes to the application file since I started using them and the changes to HTML, CSS and Javascript would propagate without reloading. Sorry for the waste of time everyone, but I must say I'm pretty ecstatic that it's working now after about 3 days of being at a stalemate

Glad you worked out the problem! Yes, you do need to reload the site when you make code changes -- it's confusing, as you say, because HTML and static file changes take effect immediately without needing to reload.