Remove 404 errors from apache configuration

Antti 2021-04-01 09:59:31 +03:00
parent a540a92889
commit 6ee1ce812c

@ -45,7 +45,8 @@ server {
```
## Apache
I am not using Apache and i have not tested this myself, but here is a solution from [@kencinder](https://github.com/kencinder) as an example configuration:
I am not using Apache and i have not tested this myself, but here is a solution from [@kencinder](https://github.com/kencinder) as an example configuration:
Tested and modified by @Chicken
```apache
DocumentRoot /var/www/
<Directory /var/www/>
@ -60,7 +61,14 @@ DocumentRoot /var/www/
# without it, Content-Type will be "application/x-gzip"
RewriteCond %{HTTP:Accept-Encoding} \b(x-)?gzip\b
RewriteCond %{REQUEST_FILENAME}.gz -s
RewriteRule ^(.+) $1.gz [L]
RewriteRule ^(.+) $1.gz
# Check if file doesn't exists
RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite request to emptyTile
RewriteRule ^.*$ /assets/emptyTile.json [L]
# Also add a content-encoding header to tell the browser to decompress
<FilesMatch .gz$>