From patchwork Wed Nov 9 15:41:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 60282 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 37A4A3858D28 for ; Wed, 9 Nov 2022 15:42:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 37A4A3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668008533; bh=wN0S9rB30gXWAqYlXqxBYE79yEvy2vJHfwVMfqjIB1Q=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=kCIAaBTkeFydijdgkb5t9zguYuPTcCTwdJM+x0otoIhB2TBv8CY7lTv0pMeYFjWYI fVbR//qGCseyoCxSZi8k98H+dv367KbnJozVXUiO5vlpq2lDt0MHkk0RzrzqjRpVqU ffOG6JsyfencgFdxDE67eSH61JGQYbdYH0FHNIZY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id DA8C93858D28 for ; Wed, 9 Nov 2022 15:41:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DA8C93858D28 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-313-9PWOWj0wPra_ss6OuHhiYg-1; Wed, 09 Nov 2022 10:41:41 -0500 X-MC-Unique: 9PWOWj0wPra_ss6OuHhiYg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CF1951C0512E; Wed, 9 Nov 2022 15:41:40 +0000 (UTC) Received: from localhost (unknown [10.33.36.199]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8CA9B2166B29; Wed, 9 Nov 2022 15:41:40 +0000 (UTC) To: gcc-patches@gcc.gnu.org Cc: marxin@gcc.gnu.org, Gerald Pfeifer Subject: [wwwdocs] Add httpd redirects for texinfo trunk docs and for each release series Date: Wed, 9 Nov 2022 15:41:39 +0000 Message-Id: <20221109154139.4561-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" I've tested that the redirects work on my own httpd server, and have verified that no new sphinx-generated docs match these patterns, and no old texinfo docs fail to match them (except for cases like index.html where a new file exists with the same name anyway so we don't need a redirect). For example, on gcc.gnu.org: cd htdocs/onlinedocs/gcc-12.2.0 # All "missing" URLs are matched by these patterns: for i in {gcc,cpp}/*.html ; do test -f ../$i || echo $i ; done | grep -E -v '^(gcc|cpp)/([[:upper:]].*|_00(5f|40).*|aarch64-feature-modifiers|c99-like-fast-enumeration-syntax|compatibility_005f.*|dashMF|eBPF-Options|fdollars-in-identifiers|lto-dump-Intro|(m68k|msp430|picoChip|x86|zSeries).*|trigraphs).*\.html$' for i in gccint/*.html ; do test -f ../$i || echo $i ; done | grep -E -v '^gccint/([[:upper:]].*|(arm|define|input|poly|stack|window)_005f.*|compat-Testing|(epi|pro)logue-instruction-pattern|gcc-Directory|gcov-Testing|loop-iv|profopt-Testing|real-RTL-SSA-insns|shift-patterns|wi-arith.*)\.html$' for i in cppinternals/*.html ; do test -f ../$i || echo $i ; done | grep -E -v '^cppinternals/([[:upper:]].*)\.html$' # No still-valid URLs are matched: for i in {gcc,cpp}/*.html ; do test -f ../$i && echo $i ; done | grep -E '^(gcc|cpp)/([[:upper:]].*|_00(5f|40).*|aarch64-feature-modifiers|c99-like-fast-enumeration-syntax|compatibility_005f.*|dashMF|eBPF-Options|fdollars-in-identifiers|lto-dump-Intro|(m68k|msp430|picoChip|x86|zSeries).*|trigraphs).*\.html$' for i in gccint/*.html ; do test -f ../$i && echo $i ; done | grep -E '^gccint/([[:upper:]].*|(arm|define|input|poly|stack|window)_005f.*|compat-Testing|(epi|pro)logue-instruction-pattern|gcc-Directory|gcov-Testing|loop-iv|profopt-Testing|real-RTL-SSA-insns|shift-patterns|wi-arith.*)\.html$' for i in cppinternals/*.html ; do test -f ../$i && echo $i ; done | grep -E '^cppinternals/([[:upper:]].*)\.html$' I haven't added redirects for other sub-dirs such as gccgo, gfortran, libgomp etc. so if somebody cares about those, they should deal with them. OK for wwwdocs? -- >8 -- Add redirects from /onlinedocs/gcc-X to the latest gcc-X.Y.0 release (which will need to be updated when a release is made). Also add redirects from URLs for old trunk docs such as https://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html to the gcc-12 equivalent of that page. --- htdocs/.htaccess | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/htdocs/.htaccess b/htdocs/.htaccess index 18997d63..bf7124ea 100644 --- a/htdocs/.htaccess +++ b/htdocs/.htaccess @@ -79,3 +79,17 @@ Redirect /onlinedocs/libc https://www.gnu.org/software/libc/manual/ht Redirect /onlinedocs/standards https://www.gnu.org/prep/standards/html_node/ Redirect /onlinedocs/ref https://gcc.gnu.org/onlinedocs/gcc-4.3.2/ + +Redirect /onlinedocs/gcc-5/ https://gcc.gnu.org/onlinedocs/gcc-5.5.0/ +Redirect /onlinedocs/gcc-6/ https://gcc.gnu.org/onlinedocs/gcc-6.5.0/ +Redirect /onlinedocs/gcc-7/ https://gcc.gnu.org/onlinedocs/gcc-7.5.0/ +Redirect /onlinedocs/gcc-8/ https://gcc.gnu.org/onlinedocs/gcc-8.5.0/ +Redirect /onlinedocs/gcc-9/ https://gcc.gnu.org/onlinedocs/gcc-9.5.0/ +Redirect /onlinedocs/gcc-10/ https://gcc.gnu.org/onlinedocs/gcc-10.4.0/ +Redirect /onlinedocs/gcc-11/ https://gcc.gnu.org/onlinedocs/gcc-11.3.0/ +Redirect /onlinedocs/gcc-12/ https://gcc.gnu.org/onlinedocs/gcc-12.2.0/ + +# Redirect URLs for old texinfo trunk docs to gcc-12 +RedirectMatch permanent /onlinedocs/(gcc|cpp)/([[:upper:]].*|_00(5f|40).*|aarch64-feature-modifiers|c99-like-fast-enumeration-syntax|compatibility_005f.*|dashMF|eBPF-Options|fdollars-in-identifiers|lto-dump-Intro|(m68k|msp430|picoChip|x86|zSeries).*|trigraphs).*\.html$ https://gcc.gnu.org/onlinedocs/gcc-12/$1/$2.html +RedirectMatch permanent /onlinedocs/gccint/([[:upper:]].*|(arm|define|input|poly|stack|window)_005f.*|compat-Testing|(epi|pro)logue-instruction-pattern|gcc-Directory|gcov-Testing|loop-iv|profopt-Testing|real-RTL-SSA-insns|shift-patterns|wi-arith.*)\.html$ https://gcc.gnu.org/onlinedocs/gcc-12/gccint/$1.html +RedirectMatch permanent /onlinedocs/cppinternals/([[:upper:]].*)\.html$ https://gcc.gnu.org/onlinedocs/gcc-12/gccint/$1.html