2013-11-22 15:59:59 +02:00
|
|
|
DirectoryIndex index.php
|
|
|
|
|
2013-01-10 16:33:01 +02:00
|
|
|
<IfModule mod_xsendfile.c>
|
2012-10-29 12:58:02 +02:00
|
|
|
<Files fetch.php>
|
2013-11-30 17:45:56 +02:00
|
|
|
XSendFile on
|
2012-10-29 12:58:02 +02:00
|
|
|
</Files>
|
2013-01-10 16:33:01 +02:00
|
|
|
</IfModule>
|
2012-10-29 12:58:02 +02:00
|
|
|
|
2012-12-10 07:14:33 +02:00
|
|
|
###########################################
|
|
|
|
# If the notation above don't work, you can try that one
|
|
|
|
# Disclaimer : I'm no apache expert it can be bad security wise :(
|
|
|
|
###########################################
|
|
|
|
#XSendFile On
|
|
|
|
#XSendFileAllowAbove on
|
|
|
|
|
2015-08-05 17:57:05 +03:00
|
|
|
###########################################
|
|
|
|
# If you want to use user based configuration with
|
|
|
|
# apache 2.4 + php-fpm enable this
|
|
|
|
# https://github.com/seblucas/cops/issues/213
|
|
|
|
###########################################
|
|
|
|
#SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
|
|
|
|
|
2013-01-31 00:51:16 +02:00
|
|
|
###########################################
|
|
|
|
# On WAMP one user had to add this line in his httpd.conf
|
|
|
|
# None of the abose was working
|
|
|
|
###########################################
|
|
|
|
#XSendFilePath <YourCalibrePath>
|
|
|
|
|
2013-01-27 08:15:50 +02:00
|
|
|
<IfModule mod_rewrite.c>
|
2012-10-29 12:58:02 +02:00
|
|
|
RewriteEngine on
|
2013-04-05 09:14:44 +03:00
|
|
|
RewriteRule ^download/(\d*)/(\d*)/.*\.kepub\.epub$ fetch.php?data=$1&db=$2&type=epub [L]
|
|
|
|
RewriteRule ^download/(\d*)/(\d*)/.*\.(.*)$ fetch.php?data=$1&db=$2&type=$3 [L]
|
|
|
|
RewriteRule ^download/(\d*)/.*\.kepub\.epub$ fetch.php?data=$1&type=epub [L]
|
|
|
|
RewriteRule ^download/(\d*)/.*\.(.*)$ fetch.php?data=$1&type=$2 [L]
|
2013-01-27 08:15:50 +02:00
|
|
|
</IfModule>
|
2012-12-10 07:14:33 +02:00
|
|
|
|
2013-06-20 21:38:29 +03:00
|
|
|
<IfModule mod_expires.c>
|
|
|
|
ExpiresActive on
|
|
|
|
|
|
|
|
# Data
|
|
|
|
ExpiresByType text/xml "access plus 0 seconds"
|
|
|
|
ExpiresByType application/xml "access plus 0 seconds"
|
|
|
|
ExpiresByType application/json "access plus 0 seconds"
|
|
|
|
ExpiresByType application/xhtml+xml "access plus 0 seconds"
|
|
|
|
|
|
|
|
# Favicon (cannot be renamed)
|
|
|
|
ExpiresByType image/x-icon "access plus 1 week"
|
|
|
|
|
|
|
|
# Media: images
|
|
|
|
ExpiresByType image/png "access plus 1 month"
|
|
|
|
ExpiresByType image/jpg "access plus 1 month"
|
|
|
|
ExpiresByType image/jpeg "access plus 1 month"
|
|
|
|
|
|
|
|
# Webfonts
|
|
|
|
ExpiresByType font/truetype "access plus 1 month"
|
|
|
|
ExpiresByType font/opentype "access plus 1 month"
|
|
|
|
ExpiresByType application/x-font-woff "access plus 1 month"
|
|
|
|
ExpiresByType image/svg+xml "access plus 1 month"
|
|
|
|
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
|
|
|
|
|
|
|
|
# CSS and JavaScript
|
|
|
|
ExpiresByType text/css "access plus 1 year"
|
|
|
|
ExpiresByType application/javascript "access plus 1 year"
|
|
|
|
ExpiresByType text/javascript "access plus 1 year"
|
|
|
|
</IfModule>
|
|
|
|
|
2012-12-10 07:14:33 +02:00
|
|
|
###########################################
|
2013-01-27 08:53:51 +02:00
|
|
|
# Uncomment if you wish to protect access with a password
|
2012-12-10 07:14:33 +02:00
|
|
|
###########################################
|
2013-12-02 10:42:03 +02:00
|
|
|
# If your covers and books are not available as soon as you protect it
|
|
|
|
# You can try replacing the FilesMatch directive by this one
|
|
|
|
# <FilesMatch "(index|feed)\.php">
|
|
|
|
# If helps for Sony PRS-TX and Aldiko, beware fetch.php can be accessed
|
2013-12-10 22:34:19 +02:00
|
|
|
# with authentication (see $config ['cops_fetch_protect'] for a workaround).
|
2013-12-02 10:42:03 +02:00
|
|
|
###########################################
|
2013-07-04 16:23:59 +03:00
|
|
|
#<FilesMatch "\.php$">
|
2012-12-10 07:14:33 +02:00
|
|
|
#AuthUserFile /path/to/file
|
|
|
|
#AuthGroupFile /dev/null
|
|
|
|
#AuthName "Acces securise"
|
|
|
|
#AuthType Basic
|
|
|
|
#Require valid-user
|
2014-05-12 22:26:17 +03:00
|
|
|
#</FilesMatch>
|