Add thank-you page to ebook downloads

This commit is contained in:
Alex Cabal 2024-02-25 20:12:20 -06:00
parent 29fc6f9ff2
commit 9437beaee9
9 changed files with 222 additions and 16 deletions

View file

@ -218,6 +218,9 @@ Define webroot /standardebooks.org/web
# Redirect latest version of the manual
RewriteRule ^/manual/latest(.*) /manual/index.php?url=$1 [L]
# Rewrite ebook downloads
RewriteRule ^/ebooks/(.+?)/download$ /ebooks/download.php?url-path=$1 [QSA]
# 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]
@ -307,18 +310,25 @@ Define webroot /standardebooks.org/web
RewriteRule ^/artworks/([^/\.]+)/([^/\.]+)/edit$ /artworks/edit.php?artist-url-name=$1&artwork-url-name=$2 [L]
# Specific config for /bulk-downloads
<DirectoryMatch "${webroot}/www/bulk-downloads">
# Specific config for /ebooks/<author>/<ebook>/downloads
<DirectoryMatch "^${webroot}/www/ebooks/.+">
# Both directives are required
XSendFile on
XSendFilePath /standardebooks.org/web/www/bulk-downloads
XSendFilePath ${webroot}/www/ebooks
</DirectoryMatch>
# Specific config for /bulk-downloads
<DirectoryMatch "^${webroot}/www/bulk-downloads/">
# Both directives are required
XSendFile on
XSendFilePath ${webroot}/www/bulk-downloads
</DirectoryMatch>
# Specific config for /feeds
<DirectoryMatch "^${webroot}/www/feeds">
<DirectoryMatch "^${webroot}/www/feeds/">
# This must be defined at the top level /feeds/ directory
# Both directives are required
XSendFile on
XSendFilePath /standardebooks.org/web/www/feeds
XSendFilePath ${webroot}/www/feeds
</DirectoryMatch>
</VirtualHost>

View file

@ -200,6 +200,9 @@ Define webroot /standardebooks.org/web
# Redirect latest version of the manual
RewriteRule ^/manual/latest(.*) /manual/index.php?url=$1 [L]
# Rewrite ebook downloads
RewriteRule ^/ebooks/(.+?)/download$ /ebooks/download.php?url-path=$1 [QSA]
# 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]
@ -289,18 +292,25 @@ Define webroot /standardebooks.org/web
RewriteRule ^/artworks/([^/\.]+)/([^/\.]+)/edit$ /artworks/edit.php?artist-url-name=$1&artwork-url-name=$2 [L]
# Specific config for /bulk-downloads
<DirectoryMatch "${webroot}/www/bulk-downloads">
# Specific config for /ebooks/<author>/<ebook>/downloads
<DirectoryMatch "^${webroot}/www/ebooks/.+">
# Both directives are required
XSendFile on
XSendFilePath /standardebooks.org/web/www/bulk-downloads
XSendFilePath ${webroot}/www/ebooks
</DirectoryMatch>
# Specific config for /bulk-downloads
<DirectoryMatch "^${webroot}/www/bulk-downloads/">
# Both directives are required
XSendFile on
XSendFilePath ${webroot}/www/bulk-downloads
</DirectoryMatch>
# Specific config for /feeds
<DirectoryMatch "^${webroot}/www/feeds">
<DirectoryMatch "^${webroot}/www/feeds/">
# This must be defined at the top level /feeds/ directory
# Both directives are required
XSendFile on
XSendFilePath /standardebooks.org/web/www/feeds
XSendFilePath ${webroot}/www/feeds
</DirectoryMatch>
</VirtualHost>