# Since Apache mod_rewrite cannot inspect POST data, we use URLs instead.
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^POST$
- RewriteRule /intro/cn/setlang/([a-z]{2}(?:-[a-z]{2})?)/(.*) /$2 [last,redirect,cookie=lang:$1:www.debian.org:40320:/:secure:]
+ RewriteRule /intro/cn/setlang/([a-z]{2}(?:-[a-z]{2})?)/(.*) /$2 [last,redirect,cookie=lang:$1:%{HTTP_HOST}:40320:/:secure:]
RewriteCond %{REQUEST_METHOD} ^POST$
- RewriteRule /intro/cn/unsetlang/(.*) /$2 [last,redirect,cookie=lang:invalid:www.debian.org:-1:/:secure:]
+ RewriteRule /intro/cn/unsetlang/(.*) /$2 [last,redirect,cookie=lang:invalid:%{HTTP_HOST}:-1:/:secure:]
SetEnvIf Cookie "lang=(.+)" prefer-language=$1
Header append Vary cookie