2007-05-17 15:15:58 +00:00
|
|
|
<IfModule mod_dir.c>
|
2009-07-07 15:33:25 +00:00
|
|
|
DirectoryIndex index.php5 index.php
|
2007-05-17 15:15:58 +00:00
|
|
|
</IfModule>
|
|
|
|
|
2009-01-22 15:51:50 +00:00
|
|
|
<FilesMatch "\.(sqlite|sdb|s3db|db)$">
|
2015-09-27 19:48:30 +00:00
|
|
|
<IfModule mod_authz_host.c>
|
2015-09-25 20:06:56 +00:00
|
|
|
Require all denied
|
2015-09-27 19:48:30 +00:00
|
|
|
</IfModule>
|
|
|
|
<IfModule !mod_authz_host.c>
|
2015-09-25 20:06:56 +00:00
|
|
|
Deny from all
|
2015-09-27 19:48:30 +00:00
|
|
|
</IfModule>
|
2009-01-22 15:51:50 +00:00
|
|
|
</FilesMatch>
|
|
|
|
|
2007-05-17 14:37:24 +00:00
|
|
|
<IfModule mod_rewrite.c>
|
2009-07-07 15:33:25 +00:00
|
|
|
RewriteEngine on
|
2007-05-17 14:27:46 +00:00
|
|
|
|
2009-07-07 15:33:25 +00:00
|
|
|
# rather than link to images/ha/hash and have an ugly filename,
|
|
|
|
# we link to images/hash/tags.ext; mod_rewrite splits things so
|
|
|
|
# that shimmie sees hash and the user sees tags.ext
|
|
|
|
RewriteRule ^_images/([0-9a-f]{2})([0-9a-f]{30}).*$ images/$1/$1$2 [L]
|
|
|
|
RewriteRule ^_thumbs/([0-9a-f]{2})([0-9a-f]{30}).*$ thumbs/$1/$1$2 [L]
|
2007-05-17 14:27:46 +00:00
|
|
|
|
2009-07-07 15:33:25 +00:00
|
|
|
# any requests for files which don't physically exist should be handled by index.php
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
RewriteRule ^(.*)$ index.php?q=$1&%{QUERY_STRING} [L]
|
2007-05-17 14:37:24 +00:00
|
|
|
</IfModule>
|
2007-05-18 16:43:36 +00:00
|
|
|
|
2007-07-17 17:08:13 +00:00
|
|
|
<IfModule mod_php5.c>
|
|
|
|
php_flag register_globals 0
|
|
|
|
php_flag magic_quotes_gpc 0
|
|
|
|
php_flag magic_quotes_runtime 0
|
|
|
|
</IfModule>
|
|
|
|
|
2009-07-07 15:33:25 +00:00
|
|
|
<IfModule mod_expires.c>
|
|
|
|
ExpiresActive On
|
2011-12-27 18:08:49 +00:00
|
|
|
<FilesMatch "([0-9a-f]{32}|\.(gif|jpe?g|png|css|js))$">
|
2013-07-03 08:21:21 +00:00
|
|
|
<IfModule mod_headers.c>
|
|
|
|
Header set Cache-Control "public, max-age=2629743"
|
|
|
|
</IfModule>
|
2011-12-27 18:08:49 +00:00
|
|
|
ExpiresDefault "access plus 1 month"
|
|
|
|
</FilesMatch>
|
|
|
|
#ExpiresByType text/html "now"
|
|
|
|
#ExpiresByType text/plain "now"
|
2009-07-07 15:33:25 +00:00
|
|
|
</IfModule>
|
|
|
|
|
|
|
|
<ifmodule mod_deflate.c>
|
|
|
|
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
|
|
|
|
AddOutputFilterByType DEFLATE application/x-javascript application/javascript
|
|
|
|
</ifmodule>
|
2016-05-14 21:56:08 +00:00
|
|
|
|
|
|
|
AddType audio/mp4 f4a f4b m4a
|
|
|
|
AddType audio/ogg oga ogg opus
|
2016-08-18 19:15:28 +00:00
|
|
|
AddType image/jpeg jpg jpeg
|
2016-05-14 21:56:08 +00:00
|
|
|
AddType image/bmp bmp
|
|
|
|
AddType image/svg+xml svg svgz
|
|
|
|
AddType image/webp webp
|
|
|
|
AddType video/mp4 f4v f4p m4v mp4
|
|
|
|
AddType video/ogg ogv
|
|
|
|
AddType video/webm webm
|
|
|
|
AddType video/x-flv flv
|