Skip to content

Commit 213eae6

Browse files
committed
fix(htaccess): remove dead code and duplicates from language detection
Remove unreachable `de` from non-German language list (already caught by prior rule with [L] flag), remove duplicate `fr` and `nl` entries, and add clarifying comment for the fallback-to-English rule.
1 parent 1f2d9b2 commit 213eae6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

public/.htaccess

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ ErrorDocument 404 /404.html
77
# browser language detection and corresponding redirect
88
RewriteCond %{HTTP:Accept-Language} ^de [NC]
99
RewriteRule ^$ /de [R=302,L]
10-
RewriteCond %{HTTP:Accept-Language} ^(aa|ab|af|am|ar|as|ay|az|ba|be|bh|bi|bn|bo|br|ca|co|cs|cy|da|de|dz|el|en|eo|es|et|eu|fa|fi|fj|fo|fr|fy|ga|gd|gl|gn|gu|ha|hi|hr|hu|hy|ia|ie|ik|in|is|it|iw|ja|ji|jw|ka|kk|kl|km|kn|ko|ks|ku|ky|la|ln|lo|lt|lv|mg|mi|mk|ml|mn|mo|mr|ms|mt|my|na|ne|no|oc|om|or|pa|pl|ps|pt|qu|rm|rn|ro|ru|rw|sa|sd|sg|sh|si|sk|sl|sm|sn|so|sq|sr|ss|st|su|sv|sw|ta|te|tg|th|ti|tk|tl|tn|to|tr|ts|tt|tw|uk|ur|uz|vi|vo|wo|xh|yo|zh|zu|fr|nl) [NC]
10+
# all other recognized languages → English
11+
RewriteCond %{HTTP:Accept-Language} ^(aa|ab|af|am|ar|as|ay|az|ba|be|bh|bi|bn|bo|br|ca|co|cs|cy|da|dz|el|en|eo|es|et|eu|fa|fi|fj|fo|fr|fy|ga|gd|gl|gn|gu|ha|hi|hr|hu|hy|ia|ie|ik|in|is|it|iw|ja|ji|jw|ka|kk|kl|km|kn|ko|ks|ku|ky|la|ln|lo|lt|lv|mg|mi|mk|ml|mn|mo|mr|ms|mt|my|na|ne|nl|no|oc|om|or|pa|pl|ps|pt|qu|rm|rn|ro|ru|rw|sa|sd|sg|sh|si|sk|sl|sm|sn|so|sq|sr|ss|st|su|sv|sw|ta|te|tg|th|ti|tk|tl|tn|to|tr|ts|tt|tw|uk|ur|uz|vi|vo|wo|xh|yo|zh|zu) [NC]
1112
RewriteRule ^$ /en [R=302,L]
1213

1314
RewriteRule ^de.{0,1}$ /de.html [L]

0 commit comments

Comments
 (0)