From a9e998eb24ebfebd1f856c2dd22704909733928f Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Sun, 13 Jun 2021 22:44:04 -0500 Subject: [PATCH] Remove some old rewrites and correct more current rewrites --- config/apache/standardebooks.org.conf | 40 ++++++++++++-------------- config/apache/standardebooks.test.conf | 40 ++++++++++++-------------- 2 files changed, 36 insertions(+), 44 deletions(-) diff --git a/config/apache/standardebooks.org.conf b/config/apache/standardebooks.org.conf index b3bb4903..83fbcf66 100644 --- a/config/apache/standardebooks.org.conf +++ b/config/apache/standardebooks.org.conf @@ -203,28 +203,24 @@ Define domain standardebooks.org RewriteRule ^/manual/latest(.*) /manual/index.php?url=$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] - RewriteRule ^/ebooks/sir-arthur-conan-doyle(.+)$ /ebooks/arthur-conan-doyle$1 [R=301,L] - RewriteRule ^/alices-adventures-in-wonderland.+$ /ebooks/lewis-carroll/alices-adventures-in-wonderland/$1 [R=301,L] - RewriteRule ^/ebooks/philip-k-dick/short-stories(.+)$ /ebooks/philip-k-dick/short-fiction$1 [R=301,L] - RewriteRule ^/ebooks/benjamin-disraeli/sibyl(.+)$ /ebooks/benjamin-disraeli/sybil$1 [R=301,L] - RewriteRule ^/ebooks/lewis-carroll/alices-adventures-in-wonderland/downloads/(.+)$ /ebooks/lewis-carroll/alices-adventures-in-wonderland/john-tenniel/downloads/$1 [R=301,L] - RewriteRule ^/ebooks/lewis-carroll/through-the-looking-glass/downloads/(.+)$ /ebooks/lewis-carroll/through-the-looking-glass/john-tenniel/downloads/$1 [R=301,L] - RewriteRule ^/ebooks/nikolai-gogol/short-fiction/claud-field_isabel-f-hapgood_vizetelly-and-company$ /ebooks/nikolai-gogol/short-fiction/claud-field_isabel-f-hapgood_vizetelly-and-company_george-tolstoy [R=301,L] - RewriteRule ^/ebooks/nikolai-gogol/short-fiction/claud-field_isabel-f-hapgood_vizetelly-and-company/(.+?)$ /ebooks/nikolai-gogol/short-fiction/claud-field_isabel-f-hapgood_vizetelly-and-company_george-tolstoy/$1 [R=301,L] - RewriteRule ^/ebooks/h-g-wells/tales-of-space-and-time(.+)$ /ebooks/h-g-wells/short-fiction$1 [R=301,L] - RewriteRule ^/ebooks/omar-khayyam/the-rubaiyat-of-omar-khayyam/edward-fitzgerald/edmund-dulac(.*?)$ /ebooks/omar-khayyam/the-rubaiyat-of-omar-khayyam/edward-fitzgerald$1 [R=301,L] - RewriteRule ^/ebooks/alfred-lord-tennyson/idylls-of-the-king/gustave-dore(.*?)$ /ebooks/alfred-lord-tennyson/idylls-of-the-king$1 [R=301,L] - RewriteRule ^/ebooks/w-w-jacobs/the-lady-of-the-barge/maurice-greiffenhagen(.*?)$ /ebooks/w-w-jacobs/the-lady-of-the-barge$1 [R=301,L] - RewriteRule ^/ebooks/robert-louis-stevenson/treasure-island/milo-winter(.*?)$ /ebooks/robert-louis-stevenson/treasure-island$1 [R=301,L] - RewriteRule ^/ebooks/edgar-rice-burroughs/a-princess-of-mars/frank-e-schoonover(.*?)$ /ebooks/edgar-rice-burroughs/a-princess-of-mars$1 [R=301,L] - RewriteRule ^/ebooks/abraham-merritt/the-moon-pool(.*?)$ /ebooks/a-merritt/the-moon-pool$1 [R=301,L] - RewriteRule ^/ebooks/leo-tolstoy/a-confession/aylmer-maude_louise-maude(.*?)$ /ebooks/leo-tolstoy/a-confession/aylmer-maude$1 [R=301,L] - RewriteRule ^/ebooks/f-marion-crawford/khaled-a-tale-of-arabia(.*?)$ /ebooks/f-marion-crawford/khaled$1 [R=301,L] - RewriteRule ^/ebooks/h-rider-haggard/she/maurice-greiffenhagen_charles-h-m-kerr(.*?)$ /ebooks/h-rider-haggard/she$1 [R=301,L] - RewriteRule ^/ebooks/ivan-bunin/short-fiction/s-s-koteliansky_d-h-lawrence_leonard-woolf_bernard-guilbert-guerney_the-russian-review/(.+?)$ /ebooks/ivan-bunin/short-fiction/s-s-koteliansky_d-h-lawrence_leonard-woolf_bernard-guilbert-guerney_the-russian-review_natalie-a-duddington/$1 [R=301,L] - RewriteRule ^/ebooks/henry-david-thoreau/a-yankee-in-canada(.*?)$ /ebooks/henry-david-thoreau/essays$1 [R=301,L] + RewriteRule ^/contribute/accepted-ebooks/? /contribute/collections-policy [R=301,L] + RewriteRule ^/ebooks/aristotle/the-nicomachean-ethics(/?$|/.+?$) /ebooks/aristotle/nicomachean-ethics$1 [R=301,L] + RewriteRule ^/ebooks/sir-arthur-conan-doyle(/?$|/.+?$) /ebooks/arthur-conan-doyle$1 [R=301,L] + RewriteRule ^/ebooks/benjamin-disraeli/sibyl(/?$|/.+?$) /ebooks/benjamin-disraeli/sybil$1 [R=301,L] + RewriteRule ^/ebooks/nikolai-gogol/short-fiction/claud-field_isabel-f-hapgood_vizetelly-and-company(/?$|/.+?$) /ebooks/nikolai-gogol/short-fiction/claud-field_isabel-f-hapgood_vizetelly-and-company_george-tolstoy$1 [R=301,L] + RewriteRule ^/ebooks/h-g-wells/tales-of-space-and-time(/?$|/.+?$) /ebooks/h-g-wells/short-fiction$1 [R=301,L] + RewriteRule ^/ebooks/omar-khayyam/the-rubaiyat-of-omar-khayyam/edward-fitzgerald/edmund-dulac(/?$|/.+?$) /ebooks/omar-khayyam/the-rubaiyat-of-omar-khayyam/edward-fitzgerald$1 [R=301,L] + RewriteRule ^/ebooks/alfred-lord-tennyson/idylls-of-the-king/gustave-dore(/?$|/.+?$) /ebooks/alfred-lord-tennyson/idylls-of-the-king$1 [R=301,L] + RewriteRule ^/ebooks/w-w-jacobs/the-lady-of-the-barge/maurice-greiffenhagen(/?$|/.+?$) /ebooks/w-w-jacobs/the-lady-of-the-barge$1 [R=301,L] + RewriteRule ^/ebooks/robert-louis-stevenson/treasure-island/milo-winter(/?$|/.+?$) /ebooks/robert-louis-stevenson/treasure-island$1 [R=301,L] + RewriteRule ^/ebooks/edgar-rice-burroughs/a-princess-of-mars/frank-e-schoonover(/?$|/.+?$) /ebooks/edgar-rice-burroughs/a-princess-of-mars$1 [R=301,L] + RewriteRule ^/ebooks/abraham-merritt/the-moon-pool(/?$|/.+?$) /ebooks/a-merritt/the-moon-pool$1 [R=301,L] + RewriteRule ^/ebooks/leo-tolstoy/a-confession/aylmer-maude_louise-maude(/?$|/.+?$) /ebooks/leo-tolstoy/a-confession/aylmer-maude$1 [R=301,L] + RewriteRule ^/ebooks/f-marion-crawford/khaled-a-tale-of-arabia(/?$|/.+?$) /ebooks/f-marion-crawford/khaled$1 [R=301,L] + RewriteRule ^/ebooks/h-rider-haggard/she/maurice-greiffenhagen_charles-h-m-kerr(/?$|/.+?$) /ebooks/h-rider-haggard/she$1 [R=301,L] + RewriteRule ^/ebooks/ivan-bunin/short-fiction/s-s-koteliansky_d-h-lawrence_leonard-woolf_bernard-guilbert-guerney_the-russian-review(/?$|/.+?$) /ebooks/ivan-bunin/short-fiction/s-s-koteliansky_d-h-lawrence_leonard-woolf_bernard-guilbert-guerney_the-russian-review_natalie-a-duddington$1 [R=301,L] + RewriteRule ^/ebooks/henry-david-thoreau/a-yankee-in-canada(/?$|/.+?$)$ /ebooks/henry-david-thoreau/essays$1 [R=301,L] + RewriteRule ^/ebooks/mark-twain/the-autobiography(/?$|/.+?$)$ /ebooks/mark-twain/the-autobiography-of-mark-twain$1 [R=301,L] # Redirect cover images with caching sha's to the root image # We do this because some sites like Google cache the cover image path, so changing it results in lots of 404s diff --git a/config/apache/standardebooks.test.conf b/config/apache/standardebooks.test.conf index 18756208..176d1ecb 100644 --- a/config/apache/standardebooks.test.conf +++ b/config/apache/standardebooks.test.conf @@ -202,28 +202,24 @@ Define domain standardebooks.test RewriteRule ^/manual/latest(.*) /manual/index.php?url=$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] - RewriteRule ^/ebooks/sir-arthur-conan-doyle(.+)$ /ebooks/arthur-conan-doyle$1 [R=301,L] - RewriteRule ^/alices-adventures-in-wonderland.+$ /ebooks/lewis-carroll/alices-adventures-in-wonderland/$1 [R=301,L] - RewriteRule ^/ebooks/philip-k-dick/short-stories(.+)$ /ebooks/philip-k-dick/short-fiction$1 [R=301,L] - RewriteRule ^/ebooks/benjamin-disraeli/sibyl(.+)$ /ebooks/benjamin-disraeli/sybil$1 [R=301,L] - RewriteRule ^/ebooks/lewis-carroll/alices-adventures-in-wonderland/downloads/(.+)$ /ebooks/lewis-carroll/alices-adventures-in-wonderland/john-tenniel/downloads/$1 [R=301,L] - RewriteRule ^/ebooks/lewis-carroll/through-the-looking-glass/downloads/(.+)$ /ebooks/lewis-carroll/through-the-looking-glass/john-tenniel/downloads/$1 [R=301,L] - RewriteRule ^/ebooks/nikolai-gogol/short-fiction/claud-field_isabel-f-hapgood_vizetelly-and-company$ /ebooks/nikolai-gogol/short-fiction/claud-field_isabel-f-hapgood_vizetelly-and-company_george-tolstoy [R=301,L] - RewriteRule ^/ebooks/nikolai-gogol/short-fiction/claud-field_isabel-f-hapgood_vizetelly-and-company/(.+?)$ /ebooks/nikolai-gogol/short-fiction/claud-field_isabel-f-hapgood_vizetelly-and-company_george-tolstoy/$1 [R=301,L] - RewriteRule ^/ebooks/h-g-wells/tales-of-space-and-time(.+)$ /ebooks/h-g-wells/short-fiction$1 [R=301,L] - RewriteRule ^/ebooks/omar-khayyam/the-rubaiyat-of-omar-khayyam/edward-fitzgerald/edmund-dulac(.*?)$ /ebooks/omar-khayyam/the-rubaiyat-of-omar-khayyam/edward-fitzgerald$1 [R=301,L] - RewriteRule ^/ebooks/alfred-lord-tennyson/idylls-of-the-king/gustave-dore(.*?)$ /ebooks/alfred-lord-tennyson/idylls-of-the-king$1 [R=301,L] - RewriteRule ^/ebooks/w-w-jacobs/the-lady-of-the-barge/maurice-greiffenhagen(.*?)$ /ebooks/w-w-jacobs/the-lady-of-the-barge$1 [R=301,L] - RewriteRule ^/ebooks/robert-louis-stevenson/treasure-island/milo-winter(.*?)$ /ebooks/robert-louis-stevenson/treasure-island$1 [R=301,L] - RewriteRule ^/ebooks/edgar-rice-burroughs/a-princess-of-mars/frank-e-schoonover(.*?)$ /ebooks/edgar-rice-burroughs/a-princess-of-mars$1 [R=301,L] - RewriteRule ^/ebooks/abraham-merritt/the-moon-pool(.*?)$ /ebooks/a-merritt/the-moon-pool$1 [R=301,L] - RewriteRule ^/ebooks/leo-tolstoy/a-confession/aylmer-maude_louise-maude(.*?)$ /ebooks/leo-tolstoy/a-confession/aylmer-maude$1 [R=301,L] - RewriteRule ^/ebooks/f-marion-crawford/khaled-a-tale-of-arabia(.*?)$ /ebooks/f-marion-crawford/khaled$1 [R=301,L] - RewriteRule ^/ebooks/h-rider-haggard/she/maurice-greiffenhagen_charles-h-m-kerr(.*?)$ /ebooks/h-rider-haggard/she$1 [R=301,L] - RewriteRule ^/ebooks/ivan-bunin/short-fiction/s-s-koteliansky_d-h-lawrence_leonard-woolf_bernard-guilbert-guerney_the-russian-review/(.+?)$ /ebooks/ivan-bunin/short-fiction/s-s-koteliansky_d-h-lawrence_leonard-woolf_bernard-guilbert-guerney_the-russian-review_natalie-a-duddington/$1 [R=301,L] - RewriteRule ^/ebooks/henry-david-thoreau/a-yankee-in-canada(.*?)$ /ebooks/henry-david-thoreau/essays$1 [R=301,L] + RewriteRule ^/contribute/accepted-ebooks/? /contribute/collections-policy [R=301,L] + RewriteRule ^/ebooks/aristotle/the-nicomachean-ethics(/?$|/.+?$) /ebooks/aristotle/nicomachean-ethics$1 [R=301,L] + RewriteRule ^/ebooks/sir-arthur-conan-doyle(/?$|/.+?$) /ebooks/arthur-conan-doyle$1 [R=301,L] + RewriteRule ^/ebooks/benjamin-disraeli/sibyl(/?$|/.+?$) /ebooks/benjamin-disraeli/sybil$1 [R=301,L] + RewriteRule ^/ebooks/nikolai-gogol/short-fiction/claud-field_isabel-f-hapgood_vizetelly-and-company(/?$|/.+?$) /ebooks/nikolai-gogol/short-fiction/claud-field_isabel-f-hapgood_vizetelly-and-company_george-tolstoy$1 [R=301,L] + RewriteRule ^/ebooks/h-g-wells/tales-of-space-and-time(/?$|/.+?$) /ebooks/h-g-wells/short-fiction$1 [R=301,L] + RewriteRule ^/ebooks/omar-khayyam/the-rubaiyat-of-omar-khayyam/edward-fitzgerald/edmund-dulac(/?$|/.+?$) /ebooks/omar-khayyam/the-rubaiyat-of-omar-khayyam/edward-fitzgerald$1 [R=301,L] + RewriteRule ^/ebooks/alfred-lord-tennyson/idylls-of-the-king/gustave-dore(/?$|/.+?$) /ebooks/alfred-lord-tennyson/idylls-of-the-king$1 [R=301,L] + RewriteRule ^/ebooks/w-w-jacobs/the-lady-of-the-barge/maurice-greiffenhagen(/?$|/.+?$) /ebooks/w-w-jacobs/the-lady-of-the-barge$1 [R=301,L] + RewriteRule ^/ebooks/robert-louis-stevenson/treasure-island/milo-winter(/?$|/.+?$) /ebooks/robert-louis-stevenson/treasure-island$1 [R=301,L] + RewriteRule ^/ebooks/edgar-rice-burroughs/a-princess-of-mars/frank-e-schoonover(/?$|/.+?$) /ebooks/edgar-rice-burroughs/a-princess-of-mars$1 [R=301,L] + RewriteRule ^/ebooks/abraham-merritt/the-moon-pool(/?$|/.+?$) /ebooks/a-merritt/the-moon-pool$1 [R=301,L] + RewriteRule ^/ebooks/leo-tolstoy/a-confession/aylmer-maude_louise-maude(/?$|/.+?$) /ebooks/leo-tolstoy/a-confession/aylmer-maude$1 [R=301,L] + RewriteRule ^/ebooks/f-marion-crawford/khaled-a-tale-of-arabia(/?$|/.+?$) /ebooks/f-marion-crawford/khaled$1 [R=301,L] + RewriteRule ^/ebooks/h-rider-haggard/she/maurice-greiffenhagen_charles-h-m-kerr(/?$|/.+?$) /ebooks/h-rider-haggard/she$1 [R=301,L] + RewriteRule ^/ebooks/ivan-bunin/short-fiction/s-s-koteliansky_d-h-lawrence_leonard-woolf_bernard-guilbert-guerney_the-russian-review(/?$|/.+?$) /ebooks/ivan-bunin/short-fiction/s-s-koteliansky_d-h-lawrence_leonard-woolf_bernard-guilbert-guerney_the-russian-review_natalie-a-duddington$1 [R=301,L] + RewriteRule ^/ebooks/henry-david-thoreau/a-yankee-in-canada(/?$|/.+?$)$ /ebooks/henry-david-thoreau/essays$1 [R=301,L] + RewriteRule ^/ebooks/mark-twain/the-autobiography(/?$|/.+?$)$ /ebooks/mark-twain/the-autobiography-of-mark-twain$1 [R=301,L] # Redirect cover images with caching sha's to the root image # We do this because some sites like Google cache the cover image path, so changing it results in lots of 404s