Toegevoegd: 404 & .htaccess #5
3 changed files with 78 additions and 19 deletions
93
.htaccess
Normal file → Executable file
93
.htaccess
Normal file → Executable file
|
@ -3,21 +3,80 @@ SetEnv TZ Europe/Amsterdam
|
||||||
Header set Strict-Transport-Security "max-age=31536000" env=HTTPS
|
Header set Strict-Transport-Security "max-age=31536000" env=HTTPS
|
||||||
Options All -Indexes
|
Options All -Indexes
|
||||||
|
|
||||||
<IfModule mod_expires.c>
|
|
||||||
# Turn on the module.
|
<IfModule mod_rewrite.c>
|
||||||
ExpiresActive on
|
Options +FollowSymLinks -MultiViews
|
||||||
# Set the default expiry times.
|
|
||||||
ExpiresDefault "access plus 2 days"
|
RewriteEngine On
|
||||||
ExpiresByType image/jpg "access plus 1 month"
|
RewriteBase /
|
||||||
ExpiresByType image/svg+xml "access 1 month"
|
|
||||||
ExpiresByType image/gif "access plus 1 month"
|
#www to non
|
||||||
ExpiresByType image/jpeg "access plus 1 month"
|
RewriteCond %{HTTP_HOST} ^www\.(([a-z0-9_]+\.)?domain\.com)$ [NC]
|
||||||
ExpiresByType image/png "access plus 1 month"
|
RewriteRule ^(.+?)/?$ http://%1/$1/ [R=301,L]
|
||||||
ExpiresByType text/css "access plus 1 month"
|
|
||||||
ExpiresByType text/javascript "access plus 1 month"
|
RewriteCond %{THE_REQUEST} \s/+(.+?)\.html/?[\s?] [NC]
|
||||||
ExpiresByType application/javascript "access plus 1 month"
|
RewriteRule ^ /%1/ [R=301,NE,L]
|
||||||
ExpiresByType application/x-shockwave-flash "access plus 1 month"
|
|
||||||
ExpiresByType image/ico "access plus 1 month"
|
#index redirect
|
||||||
ExpiresByType image/x-icon "access plus 1 month"
|
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
|
||||||
ExpiresByType text/html "access plus 600 seconds"
|
RewriteRule ^index\.html$ http://%{HTTP_HOST}/ [R=301,L]
|
||||||
|
|
||||||
|
# add a trailing slash to non files
|
||||||
|
RewriteCond %{ENV:REDIRECT_STATUS} ^$
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteRule ^(.*?[^/])$ %{REQUEST_URI}/ [L,R=301,NE]
|
||||||
|
|
||||||
|
# add html internally
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule ^([^.]+)/$ $1.html [L]
|
||||||
|
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule mod_expires.c>
|
||||||
|
ExpiresActive on
|
||||||
|
ExpiresDefault "access plus 1 month"
|
||||||
|
# CSS
|
||||||
|
ExpiresByType text/css "access plus 1 year"
|
||||||
|
# Data interchange
|
||||||
|
ExpiresByType application/json "access plus 0 seconds"
|
||||||
|
ExpiresByType application/xml "access plus 0 seconds"
|
||||||
|
ExpiresByType text/xml "access plus 0 seconds"
|
||||||
|
|
||||||
|
# Favicon
|
||||||
|
ExpiresByType image/x-icon "access plus 1 week"
|
||||||
|
|
||||||
|
# HTML components
|
||||||
|
ExpiresByType text/x-component "access plus 1 month"
|
||||||
|
|
||||||
|
# HTML
|
||||||
|
ExpiresByType text/html "access plus 0 seconds"
|
||||||
|
|
||||||
|
# JavaScript
|
||||||
|
ExpiresByType application/javascript "access plus 1 year"
|
||||||
|
|
||||||
|
# Manifest files
|
||||||
|
ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
|
||||||
|
ExpiresByType text/cache-manifest "access plus 0 seconds"
|
||||||
|
|
||||||
|
# Media
|
||||||
|
ExpiresByType audio/ogg "access plus 1 month"
|
||||||
|
ExpiresByType image/gif "access plus 1 month"
|
||||||
|
ExpiresByType image/jpeg "access plus 1 month"
|
||||||
|
ExpiresByType image/png "access plus 1 month"
|
||||||
|
ExpiresByType video/mp4 "access plus 1 month"
|
||||||
|
ExpiresByType video/ogg "access plus 1 month"
|
||||||
|
ExpiresByType video/webm "access plus 1 month"
|
||||||
|
|
||||||
|
# Web feeds
|
||||||
|
ExpiresByType application/atom+xml "access plus 1 hour"
|
||||||
|
ExpiresByType application/rss+xml "access plus 1 hour"
|
||||||
|
|
||||||
|
# Web fonts
|
||||||
|
ExpiresByType application/font-woff2 "access plus 1 month"
|
||||||
|
ExpiresByType application/font-woff "access plus 1 month"
|
||||||
|
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
|
||||||
|
ExpiresByType application/x-font-ttf "access plus 1 month"
|
||||||
|
ExpiresByType font/opentype "access plus 1 month"
|
||||||
|
ExpiresByType image/svg+xml "access plus 1 month"
|
||||||
</IfModule>
|
</IfModule>
|
2
404.html
2
404.html
|
@ -61,7 +61,7 @@
|
||||||
</picture>
|
</picture>
|
||||||
<br><br>
|
<br><br>
|
||||||
<div id="knop">
|
<div id="knop">
|
||||||
<a href="https://lermer.nl" class="knop knop_contact">MOVE ALONG</a><br>
|
<a href="/index.html" class="knop knop_contact">MOVE ALONG</a><br>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
0
assets/afb/notlookingfor.gif
Normal file → Executable file
0
assets/afb/notlookingfor.gif
Normal file → Executable file
After Width: | Height: | Size: 967 KiB |
Loading…
Reference in a new issue