mirror of
https://github.com/standardebooks/web.git
synced 2025-07-05 14:20:29 -04:00
Move donwload rewrite rule after legacy ebook URL rewrites
This commit is contained in:
parent
fbcafb8f1d
commit
849276736e
1 changed files with 3 additions and 3 deletions
|
@ -7,9 +7,6 @@ RewriteRule ^(/ebooks/.+/downloads/|/images/covers/) /images/do-not-hotlink.jpg
|
||||||
# We do this because some sites like Google cache the cover image path, so changing it results in lots of 404s.
|
# We do this because some sites like Google cache the cover image path, so changing it results in lots of 404s.
|
||||||
RewriteRule ^/images/covers/(.+?)\-[a-z0-9]{8}\-(cover|hero)(@2x)?\.(jpg|avif)$ /images/covers/$1-$2$3.$4
|
RewriteRule ^/images/covers/(.+?)\-[a-z0-9]{8}\-(cover|hero)(@2x)?\.(jpg|avif)$ /images/covers/$1-$2$3.$4
|
||||||
|
|
||||||
# Rewrite ebook downloads.
|
|
||||||
RewriteRule ^/ebooks/(.+?)/download$ /ebooks/download.php?url-path=$1 [QSA]
|
|
||||||
|
|
||||||
# Rewrite ebook collections.
|
# Rewrite ebook collections.
|
||||||
RewriteRule ^/ebooks/(.+?)/collections$ /ebooks/collections.php?url-path=$1 [QSA]
|
RewriteRule ^/ebooks/(.+?)/collections$ /ebooks/collections.php?url-path=$1 [QSA]
|
||||||
|
|
||||||
|
@ -61,6 +58,9 @@ RewriteRule ^/ebooks/jules-verne/eight-hundred-leagues-on-the-amazon/w-j-gordon(
|
||||||
# Rewrite ebooks taken down due to copyright clarifications.
|
# Rewrite ebooks taken down due to copyright clarifications.
|
||||||
RewriteRule ^/ebooks/jules-verne/twenty-thousand-leagues-under-the-seas/f-p-walter.* - [R=451,L]
|
RewriteRule ^/ebooks/jules-verne/twenty-thousand-leagues-under-the-seas/f-p-walter.* - [R=451,L]
|
||||||
|
|
||||||
|
# Rewrite ebook downloads.
|
||||||
|
RewriteRule ^/ebooks/(.+?)/download$ /ebooks/download.php?url-path=$1 [QSA]
|
||||||
|
|
||||||
# Prevent this rule from firing if we're getting a distribution file.
|
# Prevent this rule from firing if we're getting a distribution file.
|
||||||
RewriteCond %{REQUEST_FILENAME} !^/ebooks/.+?/downloads/.+$
|
RewriteCond %{REQUEST_FILENAME} !^/ebooks/.+?/downloads/.+$
|
||||||
RewriteCond %{REQUEST_FILENAME} !^/ebooks/.+?/text.*$
|
RewriteCond %{REQUEST_FILENAME} !^/ebooks/.+?/text.*$
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue