mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-10 00:42:06 +00:00
Handle references to .html pages, for example the link to security. We can
fix the links, but we need to keep the old references for links coming in from other sites.
This commit is contained in:
@ -14,3 +14,5 @@ def event(request, eventid):
|
||||
def signup(request):
|
||||
return HttpResponseRedirect("/account/signup/")
|
||||
|
||||
def html_extension(request, prior_to_html):
|
||||
return HttpResponseRedirect("/%s" % prior_to_html)
|
||||
|
@ -92,6 +92,9 @@ urlpatterns = patterns('',
|
||||
'document_root': '../media',
|
||||
}),
|
||||
|
||||
# If we're getting an attempt for something ending in HTML, just get rid of it
|
||||
(r'^(.*)\.html$', 'pgweb.legacyurl.views.html_extension'),
|
||||
|
||||
# Fallback for static pages, must be at the bottom
|
||||
(r'^(.*)/$', 'pgweb.core.views.fallback'),
|
||||
)
|
||||
|
Reference in New Issue
Block a user