allerta-vvf/old_version/.htaccess

106 lines
2.5 KiB
ApacheConf

<IfModule mod_php4.c>
php_flag display_errors Off
</IfModule>
<IfModule mod_php5.c>
php_flag display_errors Off
</IfModule>
<IfModule mod_php7.c>
php_flag display_errors Off
</IfModule>
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>
<IfModule mod_headers.c>
Header unset X-Powered-By
Header unset X-Pingback
Header unset SERVER
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|DELETE|TRACK) [NC]
RewriteRule ^(.*)$ - [F,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* error_page.php?error=404 [L]
</IfModule>
<FilesMatch "(config|config.old|config-sample|core|ui)\.php">
Order Deny,Allow
Deny from all
</FilesMatch>
<FilesMatch "\.log$">
Order Allow,Deny
Deny from all
</FilesMatch>
<FilesMatch "^\.ht">
Order Allow,Deny
Deny from all
</FilesMatch>
<IfModule mod_mime.c>
# From https://htaccessbook.com/useful-htaccess-rules/
# JAVASCRIPT
AddType application/javascript js jsonp
AddType application/json json
<FilesMatch "manifest.webmanifest">
AddType application/manifest+json webmanifest
</FilesMatch>
# FONTS
AddType font/opentype otf
AddType application/font-woff woff
AddType application/x-font-woff woff
AddType application/vnd.ms-fontobject eot
AddType application/x-font-ttf ttc ttf
AddType image/svg+xml svg svgz
AddType application/wasm wasm.gz wasm
AddEncoding gzip gz
# AUDIO
AddType audio/mp4 m4a f4a f4b
AddType audio/ogg oga ogg
# VIDEO
AddType video/mp4 mp4 m4v f4v f4p
AddType video/ogg ogv
AddType video/webm webm
AddType video/x-flv flv
# OTHERS
AddType application/octet-stream safariextz
AddType application/x-chrome-extension crx
AddType application/x-opera-extension oex
AddType application/x-shockwave-flash swf
AddType application/x-web-app-manifest+json webapp
AddType application/x-xpinstall xpi
AddType application/xml atom rdf rss xml
AddType application/vnd.openxmlformats .docx .pptx .xlsx .xltx . xltm .dotx .potx .ppsx
AddType text/cache-manifest appcache manifest
AddType text/vtt vtt
AddType text/x-component htc
AddType text/x-vcard vcf
AddType image/webp webp
AddType image/x-icon ico
</IfModule>
<IfModule mod_headers.c>
<FilesMatch "\.(js|css|woff|woff2|ttf|eot)$">
Header set Cache-Control "max-age=2592000, public"
</FilesMatch>
<FilesMatch "\.(jpe?g|png|gif|swf|flv|pdf|svg|ico)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
</IfModule>
ServerSignature Off