On Wed, 1 Nov 2023 at 20:08, Daniel Gruno <humbed...@apache.org> wrote: > > On 2023-11-01 12:55, sebb wrote: > > On Wed, 1 Nov 2023 at 16:59, Daniel Gruno <humbed...@apache.org> wrote: > >> > >> On 2023-10-31 14:42, sebb wrote: > >>> On Tue, 31 Oct 2023 at 17:34, Daniel Gruno <humbed...@apache.org> wrote: > >>>> > >>>> On 2023-10-31 12:27, Daniel Gruno wrote: > >>>>> On 2023-10-31 12:17, sebb wrote: > >>>>>> On Tue, 31 Oct 2023 at 09:57, sebb <seb...@gmail.com> wrote: > >>>>>>> > >>>>>>> Try adding .html at the end. I think that used to be done > >>>>>>> automatically, but no longer seems to be happening. > >>>>>> > >>>>>> I checked, and it did work previously: > >>>>>> https://www-previous.staged.apache.org/events/current-event > >>>>>> (note that the redirect works, but goes to the old site, so please > >>>>>> ignore the final contents) > >>>>> > >>>>> There is a redirect in place, but it's not being honored because > >>>>> 'FileInfo' type directives (redirects) are not allowed on www.a.o via > >>>>> .htaccess. This should be addressed instead, which I am doing now. > >>> > >>> However other redirects were working. > >> > >> Yes, it turned out to be a sort of red herring. The root cause is that a > >> .htaccess file works with its directory as the root for URIs, so in this > >> case, /events/foo won't be matched, but /foo will, as /events is > >> implied. > > > > Sorry, but that does not appear to be correct. > > If it is the case, why is it that the .htaccess file under /dev is working? > > > > All its entries have a /dev prefix: > > https://github.com/apache/www-site/blob/main/content/dev/.htaccess > > > >> The .htaccess has been sorted out, and redirects are working again. > > > > Yes, by reverting the change that dropped the /events path segment. > > > > Redirection of current-event (without .html) needs the corresponding > > file to be present; I don't know why that is. > > > > It gets complicated. The revert you did only works if the current-event > file (without the .html suffix) exists. Agreed. > If it does not, then the > previous .htaccess directive works, but the reverted state does not.
No, the version without the leading /events path segment does not work at all. See below. > If > the file IS there, then the reverted state works, but the one I made > doesn't work. Without spending too much time on debugging this, I still > believe centralizing the redirects will help with whatever overrides are > causing this confusion. We have one server config for the virtual host > PLUS two .htaccess files vying for attention here. Confusion ensues. There are more than 2 htaccess files. They use absolute paths relative to the website root, not the htaccess file. I have set up a preview site: preview/htaccess. This is a copy of the main site, with a couple of adjustments: /dev/.htaccess: https://github.com/apache/www-site/blob/1d1fcc0a1050583b200fb6528edc6dfc6d444ffc/content/dev/.htaccess#L21 - removed /dev prefix from committers[.html] These both now report 404 /events/.htaccess: https://github.com/apache/www-site/blob/1d1fcc0a1050583b200fb6528edc6dfc6d444ffc/content/events/.htaccess#L9 - added /test1[.html] - 404s - added /events/test2[.html] - these work fine I think these prove that htaccess redirects require the full path from the website root, not the htaccess file. Feel free to add further tests. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@community.apache.org > For additional commands, e-mail: dev-h...@community.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@community.apache.org For additional commands, e-mail: dev-h...@community.apache.org