diff --git a/www/conservancy/static/views.py b/www/conservancy/static/views.py index 1b5fe90365b54f400f4b0a28c1e72602f8483b80..86f7bb10dd759e1295350f36813f9acd2c7f1d9b 100644 --- a/www/conservancy/static/views.py +++ b/www/conservancy/static/views.py @@ -36,14 +36,14 @@ def fundgoal_lookup(fundraiser_sought): return None def index(request, *args, **kwargs): - path = request.path + path = request.path.lstrip(u'/') + if path.endswith(u'/'): + path += u'index.html' try: path_bytes = path.encode(FILESYSTEM_ENCODING) except UnicodeEncodeError: # If the path can't be expressed on the filesystem, it must not exist. return handler404(request) - if path.endswith(u'/'): - path += u'index.html' fullpath = os.path.join(STATIC_ROOT, path_bytes) if not os.path.exists(fullpath): return handler404(request)