public inbox for
 help / color / mirror / Atom feed
From: Jonathan Wakely <>
	Gerald Pfeifer <>
Subject: Re: [wwwdocs] Add httpd redirects for texinfo trunk docs and for each release series
Date: Thu, 10 Nov 2022 12:01:27 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 09/11/22 15:41 +0000, Jonathan Wakely wrote:
>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

This has now been reported as PR web/107610. As I said there:

I've (temporarily) installed the redirects in a .htaccess on my own
site so you can test them.

Just replace "" with "" to check that it
redirects to a valid page of the gcc-12.2.0 docs:

This can be used to confirm that the regexes are working as intended.

>For example, on
>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
>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
>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
> Redirect           /onlinedocs/standards
> Redirect           /onlinedocs/ref
>+Redirect           /onlinedocs/gcc-5/ 
>+Redirect           /onlinedocs/gcc-6/ 
>+Redirect           /onlinedocs/gcc-7/ 
>+Redirect           /onlinedocs/gcc-8/ 
>+Redirect           /onlinedocs/gcc-9/ 
>+Redirect           /onlinedocs/gcc-10/
>+Redirect           /onlinedocs/gcc-11/
>+Redirect           /onlinedocs/gcc-12/
>+# 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$$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$$1.html
>+RedirectMatch permanent /onlinedocs/cppinternals/([[:upper:]].*)\.html$$1.html

      reply	other threads:[~2022-11-10 12:01 UTC|newest]

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

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:

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

  git send-email \ \ \ \ \ \

* 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).