0

我有问题:我想根据客户端浏览器语言将 htaccess 子域重定向到两个不同的 url。现在我已经尝试了这段代码 - 但它不会工作。htaccess 在正确的位置。它始终根据第一条规则重定向并忽略接受语言条件。

#Redirect all german clients to the german version of the document
RewriteCond %{HTTP_HOST} ^rules\.deine-craftbruehe\.de$ [NC]
RewriteCond %{HTTP:Accept-Language} ^de [NC]
RewriteRule ^(.*) https://docs.google.com/document/d/1glXaQEGx_Qi0wwWBvFvvggesrJElYlRrD2JTA7OktmI/edit?usp=sharing/$1 [L,R]

#Redirect all other languages to the english version of the document
RewriteCond %{HTTP_HOST} ^rules\.deine-craftbruehe\.de$ [NC]
RewriteRule ^(.*) https://docs.google.com/document/d/15ojVd67GDHw5ny4nQ04AdTDnMDGx2Lr6w5Vi6tJ-HbM/edit?usp=sharing/$1 [L,R]

如果你们中的某个人能帮我解决这个问题,那就太好了!非常感谢。

4

0 回答 0