19 lines
541 B
ApacheConf
19 lines
541 B
ApacheConf
RewriteEngine On
|
|
|
|
# non-https to https and www to non-www redirect
|
|
RewriteCond %{HTTPS} off [OR]
|
|
RewriteCond %{HTTP_HOST} ^www\. [NC]
|
|
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
|
|
RewriteRule ^ https://%1%{REQUEST_URI} [NE,R=301]
|
|
|
|
# pretty URLs
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
RewriteRule ^([^\.]+)$ $1.html [NC,L]
|
|
|
|
<filesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|svg|js|css|swf|woff2)$">
|
|
Header set Cache-Control "max-age=8380800, public"
|
|
</filesMatch>
|
|
|
|
AddType application/manifest+json .webmanifest
|