From 6aa707b7dd3798afee4eca7be7fb241aa34c00f0 Mon Sep 17 00:00:00 2001 From: Frederic Simard Date: Fri, 23 Aug 2024 14:11:46 -0400 Subject: [PATCH] Inverted order of redirections --- .htaccess | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.htaccess b/.htaccess index ac7964ae9..6af780a43 100644 --- a/.htaccess +++ b/.htaccess @@ -1,10 +1,10 @@ RewriteEngine On +# Match any URL trying to access the blog in anything but EN and redirect them to EN +RewriteCond %{REQUEST_URI} ^/(?:fr|es|ja|ru|pt|ko|id|de|zh|zh-TW)/blog/ +RewriteRule ^(.+?)/.+$ /blog/ [L,R=302] + # Match any URL under /ja, /ru, /pt, /ko, /id, /de, /zh, or /zh-TW and redirect to the corresponding index.html RewriteCond %{REQUEST_URI} ^/(ja|ru|pt|ko|id|de|zh|zh-TW)/ RewriteCond %{REQUEST_URI} !index\.html$ -RewriteRule ^(.+?)/.+$ /$1/index.html [L,R=302] - -# Match any URL trying to access the blog in anything but EN and redirect them to EN -RewriteCond %{REQUEST_URI} ^/(?:fr|es|ja|ru|pt|ko|id|de|zh|zh-TW)/blog/ -RewriteRule ^(.+?)/.+$ /blog/ [L,R=302] \ No newline at end of file +RewriteRule ^(.+?)/.+$ /$1/index.html [L,R=302] \ No newline at end of file