mirror of https://github.com/django/django.git
Allow avoidance of the Apache mod_rewrite undo.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7992 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
b653cdcfb2
commit
99bbaa0090
|
@ -182,10 +182,11 @@ def get_script_name(environ):
|
||||||
Note: this isn't used by the mod_python handler, since the equivalent of
|
Note: this isn't used by the mod_python handler, since the equivalent of
|
||||||
SCRIPT_NAME isn't available there.
|
SCRIPT_NAME isn't available there.
|
||||||
"""
|
"""
|
||||||
# If mod_rewrite had a whack at the URL, Apache set SCRIPT_URL to
|
if not environ.get('DJANGO_USE_POST_REWRITE'):
|
||||||
# SCRIPT_NAME before applying any rewrites.
|
# If mod_rewrite had a whack at the URL, Apache set SCRIPT_URL to
|
||||||
script_url = force_unicode(environ.get('SCRIPT_URL', ''))
|
# SCRIPT_NAME before applying any rewrites.
|
||||||
if script_url:
|
script_url = force_unicode(environ.get('SCRIPT_URL', ''))
|
||||||
return script_url
|
if script_url:
|
||||||
|
return script_url
|
||||||
return force_unicode(environ.get('SCRIPT_NAME', ''))
|
return force_unicode(environ.get('SCRIPT_NAME', ''))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue