From 7afb746835675af2753c7e35cebe1f7a9c7c1851 Mon Sep 17 00:00:00 2001 From: Ed Summers Date: Mon, 16 Jan 2012 23:32:32 +0000 Subject: [PATCH] got redirects working --- deploy/prod.conf | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/deploy/prod.conf b/deploy/prod.conf index 69c4f73f..f26d9b3b 100644 --- a/deploy/prod.conf +++ b/deploy/prod.conf @@ -1,12 +1,15 @@ WSGIPythonHome /opt/regluit/ENV WSGISocketPrefix /opt/regluit - + -ServerName unglue.it ServerAdmin info@gluejar.com RewriteEngine On + +RewriteCond %{SERVER_NAME} !^unglue.it$ [NC] +RewriteRule (.*) http://unglue.it$1 [R=301,L] + RewriteRule ^/$ https://unglue.it/ [R=301] RewriteRule /admin(.*) https://unglue.it/admin$1 [R=301] RewriteRule /accounts(.*) https://unglue.it/accounts$1 [R=301] @@ -33,6 +36,11 @@ SSLCertificateFile /etc/ssl/certs/server.crt SSLCertificateKeyFile /etc/ssl/private/server.key SSLCertificateChainFile /etc/ssl/certs/gd_bundle.crt +RewriteEngine On + +RewriteCond %{SERVER_NAME} !^unglue.it$ [NC] +RewriteRule (.*) https://unglue.it$1 [R=301,L] + WSGIDaemonProcess regluit-ssl processes=4 threads=4 python-eggs=/tmp/regluit-python-eggs WSGIScriptAlias / /opt/regluit/deploy/regluit.wsgi