diff options
author | Dan McGee <dan@archlinux.org> | 2011-10-27 00:25:40 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-10-27 00:26:03 -0500 |
commit | 2c8b7ad07b63a3048089be78c26c1574f15dd582 (patch) | |
tree | 29b41ce80a3836ac4637dfe45b219c296441ea4c /urls.py | |
parent | c692c96ff57272a2e59b7c2173dfb78cfa11f3ab (diff) |
Add some legacy URL redirects
Amazing that we still see hits on these URLs...
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'urls.py')
-rw-r--r-- | urls.py | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -36,6 +36,8 @@ feeds_patterns = patterns('', # Sitemaps urlpatterns += patterns('django.contrib.sitemaps.views', + # Thanks Django, we can't cache these longer because of + # https://code.djangoproject.com/ticket/2713 (r'^sitemap.xml$', 'index', {'sitemaps': our_sitemaps}), (r'^sitemap-(?P<section>.+)\.xml$', 'sitemap', @@ -86,6 +88,19 @@ urlpatterns += patterns('', (r'^todolists/$','todolists.views.public_list'), ) +legacy_urls = ( + ('^about.php', '/about/'), + ('^changelog.php', '/packages/?sort=-last_update'), + ('^download.php', '/download/'), + ('^index.php', '/'), + ('^logos.php', '/art/'), + ('^news.php', '/news/'), +) + +for old_url, new_url in legacy_urls: + urlpatterns += patterns('django.views.generic.simple', + (old_url, 'redirect_to', {'url': new_url})) + if settings.DEBUG == True: urlpatterns += patterns('', (r'^media/(.*)$', 'django.views.static.serve', |