mirror of
https://github.com/linuxserver/docker-cops.git
synced 2026-04-06 00:00:04 +08:00
update rewriting rules
This commit is contained in:
parent
52bfd307b7
commit
0ebf010349
@ -66,6 +66,7 @@ app_setup_block: |
|
||||
|
||||
# changelog
|
||||
changelogs:
|
||||
- { date: "24.09.24:", desc: "Existing users should verify: site-confs/default.conf - Update rewriting rules default site conf." }
|
||||
- { date: "14.09.24:", desc: "Ensure user config files have the right permissions." }
|
||||
- { date: "09.09.24:", desc: "In COPS 3.x, the config_local.php is being moved over to config/local.php and this container will automatically migrate it. Existing users should verify: config_local.php and/or config/local.php - define $config['cops_kepubify_path'] if they want to use it" }
|
||||
- { date: "28.08.24:", desc: "Add kepubify tool to update metadata for Kobo - see mikespub-org/seblucas-cops#77" }
|
||||
|
||||
@ -15,18 +15,18 @@ server {
|
||||
|
||||
#URL rewriting with COPS - see https://github.com/seblucas/cops/wiki/Url-Rewriting-with-COPS
|
||||
location /download/ {
|
||||
rewrite ^/download/(\d+)/(\d+)/.*\.kepub\.epub$ /fetch.php?data=$1&db=$2&type=epub last;
|
||||
rewrite ^/download/(\d+)/(\d+)/.*\.(.*)$ /fetch.php?data=$1&db=$2&type=$3 last;
|
||||
rewrite ^/download/(\d+)/.*\.kepub\.epub$ /fetch.php?data=$1&type=epub last;
|
||||
rewrite ^/download/(\d+)/.*\.(.*)$ /fetch.php?data=$1&type=$2 last;
|
||||
#rewrite ^/download/(\d+)/(\d+)/.*\.kepub\.epub$ /index.php/fetch/$2/$1/ignore.epub last;
|
||||
rewrite ^/download/(\d+)/(\d+)/.*\.(.*)$ /index.php/fetch/$2/$1/ignore.$3 last;
|
||||
#rewrite ^/download/(\d+)/.*\.kepub\.epub$ /index.php/fetch/0/$1/ignore.epub last;
|
||||
rewrite ^/download/(\d+)/.*\.(.*)$ /index.php/fetch/0/$1/ignore.$2 last;
|
||||
break;
|
||||
}
|
||||
|
||||
location /view/ {
|
||||
rewrite ^/view/(\d+)/(\d+)/.*\.kepub\.epub$ /fetch.php?data=$1&db=$2&type=epub&view=1 last;
|
||||
rewrite ^/view/(\d+)/(\d+)/.*\.(.*)$ /fetch.php?data=$1&db=$2&type=$3&view=1 last;
|
||||
rewrite ^/view/(\d+)/.*\.kepub\.epub$ /fetch.php?data=$1&type=epub&view=1 last;
|
||||
rewrite ^/view/(\d+)/.*\.(.*)$ /fetch.php?data=$1&type=$2&view=1 last;
|
||||
#rewrite ^/view/(\d+)/(\d+)/.*\.kepub\.epub$ /index.php/inline/$2/$1/ignore.epub last;
|
||||
rewrite ^/view/(\d+)/(\d+)/.*\.(.*)$ /index.php/inline/$2/$1/ignore.$3 last;
|
||||
#rewrite ^/view/(\d+)/.*\.kepub\.epub$ /index.php/inline/0/$1/ignore.epub last;
|
||||
rewrite ^/view/(\d+)/.*\.(.*)$ /index.php/inline/0/$1/ignore.$2 last;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user