Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
Inverted order of redirections
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericsimard committed Aug 23, 2024
1 parent 4a741a3 commit 6aa707b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -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]
RewriteRule ^(.+?)/.+$ /$1/index.html [L,R=302]

0 comments on commit 6aa707b

Please sign in to comment.