)]}'
{"playbooks/roles/mailman3/templates/mailman.vhost.j2":[{"author":{"_account_id":5263,"name":"Jeremy Stanley","display_name":"fungi","email":"fungi@yuggoth.org","username":"fungi","status":"missing, presumed fed"},"change_message_id":"59ca86711b85e6f36fd3c066105142d9613d81e0","unresolved":false,"context_lines":[{"line_number":21,"context_line":"  # mm3 vhost."},{"line_number":22,"context_line":"  RewriteEngine On"},{"line_number":23,"context_line":"  RewriteCond %{SERVER_NAME} \u003dlists.openinfra.dev"},{"line_number":24,"context_line":"  RewriteRule \"/(.*)\" \"https://lists.openinfra.org/$1\" [R\u003d301]"},{"line_number":25,"context_line":"  RewriteRule \"/(.*)\" \"https://%{HTTP_HOST}/$1\" [R\u003d301]"},{"line_number":26,"context_line":"\u003c/VirtualHost\u003e"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-jinja2","patch_set":1,"id":"4449ef47_a4fc27cd","line":24,"updated":"2024-11-26 19:51:37.000000000","message":"Do I need to specify L/last here?","commit_id":"93c48871a718b579fcaa4b91cebefa9dbc0f00fb"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"f572d43327093132a518c2190a153af37f9520b4","unresolved":false,"context_lines":[{"line_number":21,"context_line":"  # mm3 vhost."},{"line_number":22,"context_line":"  RewriteEngine On"},{"line_number":23,"context_line":"  RewriteCond %{SERVER_NAME} \u003dlists.openinfra.dev"},{"line_number":24,"context_line":"  RewriteRule \"/(.*)\" \"https://lists.openinfra.org/$1\" [R\u003d301]"},{"line_number":25,"context_line":"  RewriteRule \"/(.*)\" \"https://%{HTTP_HOST}/$1\" [R\u003d301]"},{"line_number":26,"context_line":"\u003c/VirtualHost\u003e"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-jinja2","patch_set":1,"id":"f705faef_6b32d4ff","line":24,"in_reply_to":"4449ef47_a4fc27cd","updated":"2024-11-26 20:55:04.000000000","message":"HTTP_HOST is listed as an http header based variable in the mod rewrite docs. I suspect that if you fallthrough to line 25 (no last on line 24) it will redirect to https://lists.openinfra.dev since that was what was in the headers for the original request. All that to say you probably do need a last directive on line 24.\n\nAlternatively don\u0027t modify the http rules at all and redirect to https then handle the host redirect only at the https level.","commit_id":"93c48871a718b579fcaa4b91cebefa9dbc0f00fb"},{"author":{"_account_id":5263,"name":"Jeremy Stanley","display_name":"fungi","email":"fungi@yuggoth.org","username":"fungi","status":"missing, presumed fed"},"change_message_id":"59ca86711b85e6f36fd3c066105142d9613d81e0","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"  # This domain has moved"},{"line_number":66,"context_line":"  RewriteCond %{SERVER_NAME} \u003dlists.openinfra.dev"},{"line_number":67,"context_line":"  RewriteRule \"/(.*)\" \"https://lists.openinfra.org/$1\" [R\u003d301]"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"  RewriteRule ^/robots.txt$ /var/www/robots/robots.txt [L]"},{"line_number":70,"context_line":"  RewriteRule \"/pipermail/(.*)\" \"/var/lib/mailman/web-data/mm2archives/%{HTTP_HOST}/public/$1\""}],"source_content_type":"text/x-jinja2","patch_set":1,"id":"6d435468_46e94c85","line":67,"updated":"2024-11-26 19:51:37.000000000","message":"And/or here?","commit_id":"93c48871a718b579fcaa4b91cebefa9dbc0f00fb"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"f572d43327093132a518c2190a153af37f9520b4","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"  # This domain has moved"},{"line_number":66,"context_line":"  RewriteCond %{SERVER_NAME} \u003dlists.openinfra.dev"},{"line_number":67,"context_line":"  RewriteRule \"/(.*)\" \"https://lists.openinfra.org/$1\" [R\u003d301]"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"  RewriteRule ^/robots.txt$ /var/www/robots/robots.txt [L]"},{"line_number":70,"context_line":"  RewriteRule \"/pipermail/(.*)\" \"/var/lib/mailman/web-data/mm2archives/%{HTTP_HOST}/public/$1\""}],"source_content_type":"text/x-jinja2","patch_set":1,"id":"3767d291_1cfdf715","line":67,"in_reply_to":"6d435468_46e94c85","updated":"2024-11-26 20:55:04.000000000","message":"See above particularly the bit about HTTP_HOST being an http header var. I think you do need last here.","commit_id":"93c48871a718b579fcaa4b91cebefa9dbc0f00fb"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"1067c787d8a4a30287deda920236c596ed1e514f","unresolved":true,"context_lines":[{"line_number":22,"context_line":"  # The lists.openinfra.dev site has moved to lists.openinfra.org"},{"line_number":23,"context_line":"  ServerAlias lists.openinfra.dev"},{"line_number":24,"context_line":"  RewriteCond %{SERVER_NAME} \u003dlists.openinfra.dev"},{"line_number":25,"context_line":"  RewriteRule \"/(.*)\" \"https://lists.openinfra.org/$1\" [L,R\u003d301]"},{"line_number":26,"context_line":"\u003c/VirtualHost\u003e"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"\u003cVirtualHost *:443\u003e"}],"source_content_type":"text/x-jinja2","patch_set":3,"id":"d51f4079_755debb1","line":25,"updated":"2024-12-02 14:08:11.000000000","message":"I\u0027m not a rules specialist, but possibly this rule might need to go in front of the earlier rule? I mean, it\u0027s not critical, worst case this rule never matches and the second redirect is done by the https side of things, but it might be a small optimization.\n\nMaybe you can check against your test server, not sure it would be worth adding test cases for this, or is it?","commit_id":"3acb3316977287690f61edd3045475df15b73b0f"},{"author":{"_account_id":5263,"name":"Jeremy Stanley","display_name":"fungi","email":"fungi@yuggoth.org","username":"fungi","status":"missing, presumed fed"},"change_message_id":"4b3c3412dd4cb59c1e8a7625de9802a32de58d70","unresolved":false,"context_lines":[{"line_number":22,"context_line":"  # The lists.openinfra.dev site has moved to lists.openinfra.org"},{"line_number":23,"context_line":"  ServerAlias lists.openinfra.dev"},{"line_number":24,"context_line":"  RewriteCond %{SERVER_NAME} \u003dlists.openinfra.dev"},{"line_number":25,"context_line":"  RewriteRule \"/(.*)\" \"https://lists.openinfra.org/$1\" [L,R\u003d301]"},{"line_number":26,"context_line":"\u003c/VirtualHost\u003e"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"\u003cVirtualHost *:443\u003e"}],"source_content_type":"text/x-jinja2","patch_set":3,"id":"2bb59fbe_f1e6fc41","line":25,"updated":"2024-12-02 14:34:39.000000000","message":"This conditionally matches on SERVER_NAME which isn\u0027t altered by the previous rule, but for some reason that rule is moving the host part into the pattern space and causing it to get prepended in this rewrite, so yes good call on checking it explicitly (I had not previously).","commit_id":"3acb3316977287690f61edd3045475df15b73b0f"}]}
