From 935a3db8e272b9b98a4e3c086735a4bb910726d3 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Fri, 1 Jan 2016 17:18:26 +0100 Subject: [PATCH] Use REQUEST_URI to get the URL for redirector This one works both under a local dev webserver and importantly also on the production server... --- redirector/redirector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redirector/redirector.py b/redirector/redirector.py index 55dc6ce..7f918f8 100755 --- a/redirector/redirector.py +++ b/redirector/redirector.py @@ -27,7 +27,7 @@ def iddecode(idstr): def application(environ, start_response): try: # Start by getting the id from the request - id = iddecode(environ['PATH_INFO'].split('/')[-1]) + id = iddecode(environ['REQUEST_URI'].split('/')[-1]) # Let's figure out where this URL should be -- 2.39.5