Redirect unsetlang to the correct location
authorPaul Wise <pabs@debian.org>
Sun, 11 Aug 2019 09:31:09 +0000 (17:31 +0800)
committerPaul Wise <pabs@debian.org>
Sun, 11 Aug 2019 09:31:09 +0000 (17:31 +0800)
The substitution was using the wrong match group.

Fixes: commit eef0d1229a8d2627ffc8663eda9bd2d68a0ef09c

modules/roles/templates/apache-www.debian.org.erb

index 45eab88..2253aa7 100644 (file)
    RewriteCond %{REQUEST_METHOD} ^POST$
    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:%{HTTP_HOST}:-1:/:secure:]
+   RewriteRule /intro/cn/unsetlang/(.*) /$1 [last,redirect,cookie=lang:invalid:%{HTTP_HOST}:-1:/:secure:]
    SetEnvIf Cookie "lang=(.+)" prefer-language=$1
    Header append Vary cookie