0

問題があります: htaccess サブドメインを、クライアント ブラウザーの言語に基づいて 2 つの異なる URL にリダイレクトしたいと考えています。今、私はこのコードを試しましたが、うまくいきません。htaccess は適切な場所にあります。最初のルールに従って常にリダイレクトし、accept-language 条件を無視します。

#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