Add /edit endpoint to update placeholders

This commit is contained in:
Mike Colagrosso 2024-12-17 21:06:01 -07:00 committed by Alex Cabal
parent b125758138
commit f449c024ea
7 changed files with 297 additions and 73 deletions

View file

@ -19,6 +19,12 @@ RewriteRule ^/collections/([^\./]+?)$ /collections/get.php?collection=$1 [QSA]
RewriteRule ^/collections/([^/]+?)/downloads$ /bulk-downloads/get.php?collection=$1
RewriteRule ^/collections/([^/]+?)/feeds$ /feeds/get.php?collection=$1
# Edit rewrites
RewriteRule ^/ebooks/(.+?)/edit$ /ebooks/edit.php?url-path=$1 [L]
RewriteCond expr "tolower(%{REQUEST_METHOD}) =~ /^post$/"
RewriteRule ^/ebooks/([^\.]+?)$ /ebooks/post.php?url-path=$1 [L]
# List of specific URL rewrites
RewriteRule ^/contribute/accepted-ebooks/? /contribute/collections-policy [R=301,L]
RewriteRule ^/ebooks/aristotle/the-nicomachean-ethics(/?$|/.+?$) /ebooks/aristotle/nicomachean-ethics$1 [R=301,L]