RewriteEngine On

# Force HTTPS
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Force WWW
RewriteCond %{HTTP_HOST} ^getyourmenu\.in [NC]
RewriteRule ^ https://www.getyourmenu.in%{REQUEST_URI} [L,R=301]

# Allow normal files/folders
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

ErrorDocument 500 /404.html
ErrorDocument 404 /404.html
# BLOCK python direct access
<FilesMatch "\.py$">
    Require all denied
</FilesMatch>
