-
Notifications
You must be signed in to change notification settings - Fork 5
/
.htaccess
74 lines (53 loc) · 2.37 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
Options -Indexes
</IfModule>
RewriteEngine On
php_flag html_errors Off
php_flag log_error Off
# Prevent Hot-linking (especially for images)
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?(localhost|jollof.com)/.*$ [NC]
RewriteCond %{REQUEST_URI} \.(gif|jpg|jpeg|bmp|zip|rar|mp3|flv|swf|xml|php|png|css|pdf)$
RewriteRule . - [F]
# Disallow Dastradly Crawlers And Site-Mirroring Apps
RewriteCond %{HTTP_USER_AGENT} ^Teleport\ Pro [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^HT\ ?Track [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^BackWeb [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Bandit [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^BatchFTP [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^BecomeBot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Sponger [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Net\ Vampire [NC]
RewriteRule . web.abused [L]
# Trigger Jollof Routes
RewriteCond %{REQUEST_URI} !^/documentation/
RewriteRule !^(.+\.)([a-z]+)(/)?$ public/index.php [E=HTTP_CONTENT_TYPE:%{HTTP:Content-Type},L,QSA]
</IfModule>
# Mime Types for Special Files
AddType text/plain .abused # Jollof Abused file
AddType text/cache-manifest .appcache # Offline-First support
AddType application/manifest+json .json # Manifest for Native Web Apps support
AddType video/ogg .ogv # codec
AddType video/mp4 .mp4 # mp4 codec
AddType video/webm .webm # theora codec
# Mobile Site/App Version Crawling - This helps googlebot when crawling your web site/app on mobile devices
<IfModule mod_headers.c>
Header append Vary User-Agent
</IfModule>
# Enable file compression (where possible) - use DEFLATE Compression Scheme
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE appliation/javascript
</IfModule>
# Enhanced caching for site static assets
<FilesMatch ".(flv|gif|jpg|jpeg|mp3|mp4|avi|ogv|webm|png|ico|swf|js|css|pdf)$">
Header set Cache-control "max-age=28800"
</FilesMatch>
# The Application Cache manifest file and ML files needs not be cached on the client
<FilesMatch ".(html|xml|appcache)$">
Header set Cache-control "no-store, no-cache, no-transform"
Header set Expires "1"
</FilesMatch>