mirror of
https://github.com/standardebooks/web.git
synced 2025-07-22 15:24:46 -04:00
Update ebooks to explode the ./src/epub folder into ebook endpoints, instead of just exploding the whole epub
This commit is contained in:
parent
d9ac7312c2
commit
73ba658a05
7 changed files with 20 additions and 19 deletions
|
@ -165,11 +165,7 @@ Define domain standardebooks.org
|
|||
RewriteRule ^/(.+?)/$ /$1 [R=301,L]
|
||||
|
||||
# Redirect ToC of XHTML representation of books
|
||||
RewriteRule ^/ebooks/(.+?)/text$ /ebooks/$1/src/epub/toc.xhtml [L]
|
||||
|
||||
# Redirect XHTML representation of books
|
||||
# This has to appear before the next check, so that we can exclude .xhtml endings
|
||||
RewriteRule ^/ebooks/(.+?)/(text|css|images|fonts)(.*) /ebooks/$1/src/epub/$2$3
|
||||
RewriteRule ^/ebooks/(.+?)/text$ /ebooks/$1/toc.xhtml [L]
|
||||
|
||||
# Received: /filename and /filename.xhtml exists in filesystem; Result: rewrite to /filename.xhtml
|
||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME}.xhtml -f
|
||||
|
@ -228,7 +224,7 @@ Define domain standardebooks.org
|
|||
|
||||
# Prevent this rule from firing if we're getting a distribution file
|
||||
RewriteCond %{REQUEST_FILENAME} !^/ebooks/.+?/downloads/.+$
|
||||
RewriteCond %{REQUEST_FILENAME} !^/ebooks/.+?/src/.+$
|
||||
RewriteCond %{REQUEST_FILENAME} !^/ebooks/.+?/text.*$
|
||||
RewriteRule ^/ebooks/([^\.]+?)$ /ebooks/ebook.php?url-path=$1
|
||||
|
||||
# If we ask for /opds/all?query=xyz, rewrite that to the search page.
|
||||
|
|
|
@ -164,11 +164,7 @@ Define domain standardebooks.test
|
|||
RewriteRule ^/(.+?)/$ /$1 [R=301,L]
|
||||
|
||||
# Redirect ToC of XHTML representation of books
|
||||
RewriteRule ^/ebooks/(.+?)/text$ /ebooks/$1/src/epub/toc.xhtml [L]
|
||||
|
||||
# Redirect XHTML representation of books
|
||||
# This has to appear before the next check, so that we can exclude .xhtml endings
|
||||
RewriteRule ^/ebooks/(.+?)/(text|css|images|fonts)(.*) /ebooks/$1/src/epub/$2$3
|
||||
RewriteRule ^/ebooks/(.+?)/text$ /ebooks/$1/toc.xhtml [L]
|
||||
|
||||
# Received: /filename and /filename.xhtml exists in filesystem; Result: rewrite to /filename.xhtml
|
||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME}.xhtml -f
|
||||
|
@ -227,7 +223,7 @@ Define domain standardebooks.test
|
|||
|
||||
# Prevent this rule from firing if we're getting a distribution file
|
||||
RewriteCond %{REQUEST_FILENAME} !^/ebooks/.+?/downloads/.+$
|
||||
RewriteCond %{REQUEST_FILENAME} !^/ebooks/.+?/src/.+$
|
||||
RewriteCond %{REQUEST_FILENAME} !^/ebooks/.+?/text.*$
|
||||
RewriteRule ^/ebooks/([^\.]+?)$ /ebooks/ebook.php?url-path=$1
|
||||
|
||||
# If we ask for /opds/all?query=xyz, rewrite that to the search page.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue