Permalink
Browse files

Redirect hackery

  • Loading branch information...
j4mie committed May 9, 2012
1 parent d06a1ae commit b0e4846745531cf8d791fefac078320318705a4e
Showing with 2 additions and 4 deletions.
  1. +2 −4 brighton.py
View
@@ -108,10 +108,8 @@ def format_datetime(datetime_object, format):
@app.before_request
def redirect_from_epio():
- """Temporary hack to redirect requests to brightonpy.ep.io to
- brightonpy.org - should be able to remove this when ep.io can
- do this kind of thing natively."""
- if 'ep.io' in request.host:
+ """Redirect www to naked domain"""
+ if "www" in request.host:
return redirect('http://brightonpy.org' + request.path, 301)
if __name__ == '__main__':

0 comments on commit b0e4846

Please sign in to comment.