Dmitry V. Levin wrote:
On Tue, May 14, 2024 at 01:26:03PM -0400, Zack Weinberg wrote:
On Tue, May 14, 2024, at 12:31 PM, Dmitry V. Levin wrote:
On Tue, May 14, 2024 at 10:34:11AM -0400, Zack Weinberg wrote:
--- /dev/null   2024-05-14 09:16:42.181936154 -0400
+++ .htaccess   2024-05-14 09:32:57.063158152 -0400
@@ -0,0 +1,4 @@
+Redirect permanent /software/config/config.guess 
https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+Redirect permanent /software/config/config.sub   
https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+Redirect permanent /software/config/index.html   
https://savannah.gnu.org/projects/config
+Redirect permanent /software/config/             
https://savannah.gnu.org/projects/config
Applied, thanks.
Unfortunately I seem to have gotten it partially wrong; www.gnu.org
now bounces *every* URL of the form
https://www.gnu.org/software/config/xxxxx to
https://savannah.gnu.org/projects/config, ignoring the more specific
directives.  Apache's documentation is not very clear but I *think*
the problem is the last line.  Can you please delete

Redirect /software/config/             https://savannah.gnu.org/projects/config

Yes, this makes sense, I've removed that line, but, unfortunately,
there is no visible difference:

$ curl -I https://www.gnu.org/software/config/config.guess
HTTP/1.1 302 Found
Date: Tue, 14 May 2024 22:12:12 GMT
Server: Apache/2.4.29
Strict-Transport-Security: max-age=63072000
X-Frame-Options: sameorigin
X-Content-Type-Options: nosniff
Access-Control-Allow-Origin: (null)
Location: https://savannah.gnu.org/projects/config
Content-Type: text/html; charset=iso-8859-1

I suggest restoring the old index.html file with its <META> redirect and changing .htaccess to:

8<------
Redirect "/software/config/config.guess" 
"https://git.savannah.gnu.org/cgit/config.git/plain/config.guess";
Redirect "/software/config/config.sub" 
"https://git.savannah.gnu.org/cgit/config.git/plain/config.sub";
8<------


The Apache documentation that I have found (<URL:https://httpd.apache.org/docs/current/mod/mod_alias.html#redirect> and <URL:https://httpd.apache.org/docs/current/howto/htaccess.html>) uses the quotes in all examples; I do not know if they are actually required.

Another option uses RedirectMatch:

8<------
RedirectMatch "/config\.(.*)$" 
"https://git.savannah.gnu.org/cgit/config.git/plain/config.$1";
8<------


This second option redirects a request for any file config.FOO to Savannah CGit. (I could have used $0 in the replacement, but $1 is more clear.)

Also, asking the FSF sysadmins very nicely to initiate a graceful restart of the httpd might help, if the wildcard redirects have somehow been cached in the running Apache.


-- Jacob


Reply via email to