public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: gcc-patches@gcc.gnu.org
Cc: marxin@gcc.gnu.org, Gerald Pfeifer <gerald@pfeifer.com>
Subject: [wwwdocs] Add httpd redirects for texinfo trunk docs and for each release series
Date: Wed,  9 Nov 2022 15:41:39 +0000	[thread overview]
Message-ID: <20221109154139.4561-1-jwakely@redhat.com> (raw)

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
-- 
2.38.1


             reply	other threads:[~2022-11-09 15:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09 15:41 Jonathan Wakely [this message]
2022-11-10 12:01 ` Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221109154139.4561-1-jwakely@redhat.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gerald@pfeifer.com \
    --cc=marxin@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).