python - Why Flask gives 404 for files in the same directory with my application -


let's have domain. under home directory of domain have text(.txt) file called note.txt. below

https://www.example.com/note.txt

when access url, browser display text string contained inside file. when run flask under domain instead of traditional html,css,javascript,php app, server return 404error though file exists in fact @ same location. can see ftp client.

so why server returns 404 error when site hosts python app instead of more traditional html,css,javascript,php app?

what missing here flask has its own url routing.

the answer "why server returns 404 error" url routing should explicit (nothing happens unless tell happen) instead of implicit (everything on server exposed default). because php chose latter approach, wordpress, drupal, et. al. traditional php sites getting hacked when given people don't have full picture doing. might convenient in beginning, open invitation script kiddies raid server.


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -