mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-27 14:57:40 +00:00
redirect http to https
This commit is contained in:
parent
cbed64f462
commit
b7e259402c
1 changed files with 10 additions and 1 deletions
|
|
@ -21,9 +21,18 @@ ExpiresDefault A259200
|
||||||
Header append Cache-Control "private, must-revalidate"
|
Header append Cache-Control "private, must-revalidate"
|
||||||
</FilesMatch>
|
</FilesMatch>
|
||||||
|
|
||||||
|
|
||||||
|
################
|
||||||
|
### Rewrites ###
|
||||||
|
################
|
||||||
|
RewriteEngine On
|
||||||
|
|
||||||
|
# Redirect http to https
|
||||||
|
RewriteCond %{HTTPS} off
|
||||||
|
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
|
||||||
|
|
||||||
# Make super old posts redirect properly.
|
# Make super old posts redirect properly.
|
||||||
# e.g. http://sami.samhuri.net/2007/6/23/emacs-for-textmate-junkies
|
# 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]/(.*)$ /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/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]
|
RewriteRule ^posts/([0-9][0-9][0-9][0-9])/([0-9][0-9])/[0-9]/(.*)$ /posts/$1/$2/$3 [R=301]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue