From decb3f15f65ecab93d8a39d09e2b642754f3f550 Mon Sep 17 00:00:00 2001 From: pictuga Date: Tue, 7 Apr 2015 09:36:00 +0800 Subject: [PATCH] Move the mod_cgi files to /cgi/ --- morss/morss.py | 2 +- www/.htaccess | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/morss/morss.py b/morss/morss.py index 31838d8..3473486 100644 --- a/morss/morss.py +++ b/morss/morss.py @@ -542,7 +542,7 @@ def cgi_app(environ, start_response): else: url = environ['PATH_INFO'][1:] - url = re.sub(r'^/?morss.py/', '', url) + url = re.sub(r'^/?(morss.py|main.py|cgi/main.py)/', '', url) if url.startswith(':'): split = url.split('/', 1) diff --git a/www/.htaccess b/www/.htaccess index 59c58b6..9d04495 100644 --- a/www/.htaccess +++ b/www/.htaccess @@ -1,5 +1,5 @@ AddHandler cgi-script .py Options +ExecCGI -ErrorDocument 404 /morss.py +ErrorDocument 404 /cgi/main.py ErrorDocument 500 "A very nasty bug found his way onto this very server"