projects
/
hamn.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12eda0e
)
Use REQUEST_URI to get the URL for redirector
author
Magnus Hagander
<magnus@hagander.net>
Fri, 1 Jan 2016 16:18:26 +0000
(17:18 +0100)
committer
Magnus Hagander
<magnus@hagander.net>
Fri, 1 Jan 2016 16:18:26 +0000
(17:18 +0100)
This one works both under a local dev webserver and importantly also
on the production server...
redirector/redirector.py
patch
|
blob
|
blame
|
history
diff --git
a/redirector/redirector.py
b/redirector/redirector.py
index 55dc6ce9ee6ce930c607f939b877631de670cf36..7f918f8b4e945e44e7e27883ad37b0a2ccb6be3d 100755
(executable)
--- 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