From: Rico Hoppe Date: Sun, 3 Mar 2024 11:29:40 +0000 (+0000) Subject: init.py: added redirection for legacy location path X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d85935373da49f16ca9155feec9c47f5ab8c725a;p=people%2Fric9%2Fipfire.org.git init.py: added redirection for legacy location path Signed-off-by: Rico Hoppe --- diff --git a/src/web/__init__.py b/src/web/__init__.py index de561c7a..570d00ee 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -353,9 +353,12 @@ class Application(tornado.web.Application): (r"/static/(.*)", tornado.web.StaticFileHandler, { "path" : self.settings.get("static_path") }), ] + authentication_handlers) - # location.ipfire.org + # location.ipfire.org and /projects/location self.add_handlers(r"location\.([a-z]+\.dev\.)?ipfire\.org", [ - (r"(.*)", tornado.web.RedirectHandler, { "url" : "https://www.ipfire.org/projects/location{0}" }), + (r"(.*)", tornado.web.RedirectHandler, { "url" : "https://www.ipfire.org/location{0}" }), + ]) + self.add_handlers(r"www\.([a-z]+\.dev\.)?ipfire\.org", [ + (r"/projects/location/(.*)", tornado.web.RedirectHandler, { "url" : "https://www.ipfire.org/location{0}" }), ]) # geoip.ipfire.org