Add search ability to OPDS feed

This commit is contained in:
Alex Cabal 2020-06-19 16:20:40 -05:00
parent c6988a87d7
commit 86f3adca36
7 changed files with 94 additions and 6 deletions

View file

@ -159,9 +159,9 @@ Define domain standardebooks.org
RewriteRule ^(.+)$ $1.php [QSA]
# End PHP-FPM configuration
# Received: /filename and /filename.xml exists in filesystem; Result: rewrite to /filename.xml and end request
# Received: /filename and /filename.xml exists in filesystem; Result: rewrite to /filename.xml
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME}.xml -f
RewriteRule (.*) $1.xml [L]
RewriteRule (.*) $1.xml
# Remove trailing slashes
RewriteRule ^/(.+?)/$ /$1 [R=301,L]
@ -219,6 +219,10 @@ Define domain standardebooks.org
RewriteCond %{REQUEST_FILENAME} !^/ebooks/.+?/dist/.+$
RewriteCond %{REQUEST_FILENAME} !^/ebooks/.+?/src/.+$
RewriteRule ^/ebooks/([^\.]+?)$ /ebooks/ebook.php?url-path=$1
# If we ask for /opds/all?query=xyz, rewrite that to the search page.
RewriteCond %{QUERY_STRING} ^query=
RewriteRule ^/opds/all.xml$ /opds/search.php [QSA]
</VirtualHost>
<VirtualHost *:80>

View file

@ -158,9 +158,9 @@ Define domain standardebooks.test
RewriteRule ^(.+)$ $1.php [QSA]
# End PHP-FPM configuration
# Received: /filename and /filename.xml exists in filesystem; Result: rewrite to /filename.xml and end request
# Received: /filename and /filename.xml exists in filesystem; Result: rewrite to /filename.xml
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME}.xml -f
RewriteRule (.*) $1.xml [L]
RewriteRule (.*) $1.xml
# Remove trailing slashes
RewriteRule ^/(.+?)/$ /$1 [R=301,L]
@ -218,4 +218,8 @@ Define domain standardebooks.test
RewriteCond %{REQUEST_FILENAME} !^/ebooks/.+?/dist/.+$
RewriteCond %{REQUEST_FILENAME} !^/ebooks/.+?/src/.+$
RewriteRule ^/ebooks/([^\.]+?)$ /ebooks/ebook.php?url-path=$1
# If we ask for /opds/all?query=xyz, rewrite that to the search page.
RewriteCond %{QUERY_STRING} ^query=
RewriteRule ^/opds/all.xml$ /opds/search.php [QSA]
</VirtualHost>