diff --git a/public/.htaccess b/public/.htaccess index 035ac4e..20b0841 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -21,9 +21,18 @@ ExpiresDefault A259200 Header append Cache-Control "private, must-revalidate" + +################ +### Rewrites ### +################ +RewriteEngine On + +# Redirect http to https +RewriteCond %{HTTPS} off +RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} + # Make super old posts redirect properly. # e.g. http://sami.samhuri.net/2007/6/23/emacs-for-textmate-junkies -RewriteEngine On RewriteRule ^posts/([0-9][0-9][0-9][0-9])/([0-9])/[0-9]/(.*)$ /posts/$1/0$2/$3 [R=301] RewriteRule ^posts/([0-9][0-9][0-9][0-9])/([0-9])/[0-9][0-9]/(.*)$ /posts/$1/0$2/$3 [R=301] RewriteRule ^posts/([0-9][0-9][0-9][0-9])/([0-9][0-9])/[0-9]/(.*)$ /posts/$1/$2/$3 [R=301]