2015-08-28 20:09:12 +00:00
|
|
|
RewriteEngine on
|
2017-02-20 21:51:27 +00:00
|
|
|
# Remove www from URL
|
2017-02-20 22:22:22 +00:00
|
|
|
RewriteBase /
|
|
|
|
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
|
|
|
|
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
|
2017-02-20 21:46:29 +00:00
|
|
|
# Redirect HTTP to HTTPS
|
|
|
|
RewriteCond %{HTTPS} off
|
|
|
|
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
|
2017-02-20 22:04:55 +00:00
|
|
|
# Some old URLs start with "en", just drop it
|
2017-02-20 22:22:22 +00:00
|
|
|
RewriteRule ^en/(.*)$ /$1 [R=301,L]
|
2017-02-20 21:46:29 +00:00
|
|
|
# Make .html optional
|
2015-08-28 20:09:12 +00:00
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
|
|
RewriteRule ^(.*)$ $1.html [L]
|