2015-08-28 20:09:12 +00:00
|
|
|
RewriteEngine on
|
2017-02-20 21:51:27 +00:00
|
|
|
# Remove www from URL
|
|
|
|
RewriteCond %{HTTP_HOST} ^www.openlp.org$ [NC]
|
2017-02-20 21:55:25 +00:00
|
|
|
RewriteCond %{HTTPS_HOST} ^www.openlp.org$ [NC]
|
2017-02-20 21:51:27 +00:00
|
|
|
RewriteRule ^(.*)$ https://openlp.org/$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]
|
|
|
|
# Make .html optional
|
2015-08-28 20:09:12 +00:00
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
|
|
RewriteRule ^(.*)$ $1.html [L]
|