Flask problem in Apache / CGI
I have shared hosting from Namecheap (no ssh access). There I can run any python file in the CGI-bin directory when I enter the full path, including the .py extension. I want to know how to run a flash application in such an environment. Should I change .htaccess or do .cgi or fcgi or wsgi? I'm not sure what it is or what they are doing. If anyone can explain this.
source to share
Check out http://flask.pocoo.org/docs/deploying/cgi/
If your CGI application is available in http://example.com/cgi-bin/myapp.py
, you must put the following in .htaccess
(assuming you are using Apache) to make the application available in http://example.com/
:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f # Don't interfere with static files
RewriteRule ^(.*)$ /cgi-bin/myapp.py/$1 [L]
source to share