Hi everyone !
I updated my blog to the last grav version and php 8.2 (it was running on php7.3 …) and it now causes the apache server of my provider to issue error 500 because there is too many redirections.
I use the base .htaccess file and when I saw that the problem could come from that (according to the doc) I tried to tweak it by adding RewriteBase /
and removing Options -Indexes
.
I was able to display a simple info.php page but no page from my grav site.
I don’t have much redir in my user/config/site.yaml
title: 'Le Krav-Club'
default_lang: fr
author:
name: 'Vincent FERICELLI'
email: contact.kravclub@gmail.com
taxonomies:
- category
- tag
- month
metadata:
description: Vous voulez toutes les chances de votre coté en cas d'agression et progresser en Krav-Maga ? Les articles du Krav-Club sont là pour ça !
summary:
enabled: true
format: short
size: 300
delimiter: '==='
redirects:
/fr/blog/(.*): '/articles/$1[301]'
/en/blog/(.*): '/articles/$1[301]'
/fr/articles/hiit$: '/articles/hiit-tabata[301]'
routes:
/newsletter: /subscribe
blog:
route: ''
Anyone has an idea of what is the problem?
EDIT : rephrase the .htaccess part to avoid misunderstanding
I could be disingenuous and say the problems are that you are trying to apply solutions you’ve used elsewhere and didn’t RTFM, but that would be so unlike me
Here’s what you may have missed though:
I read the manual few years ago when I first set up my blog and later for the last upgrade I did (which included remaking my custom theme from scratch).
I never modified the .htaccess before and I checked it was identical to an new grav installation from scratch. I only tried to modify it because my upgraded site didn’t work and it could be the problem according to 500 Internal Server Error | Grav Documentation.
To be clearer my blog works before upgrading, in fact I rolled back my grav site and the php version : see kravclub.fr.
So I’m wondering what change(s) in grav or php combined with the related changes I made could cause such issue.
From which Grav version did you update now?
@kravclub.fr,
First suggestion:
- Try uncommenting the redirects section in /user/config/site.yaml
Do you have folders like /user/kravclub.fr/config and/or /user/env/kravclub.fr/config?
If so, also uncomment the redirect sections in all site.yaml file in these directories.
- Is there a redirect inside frontmatter of the page?
NB. In your response to @hugbris:
I never modified the .htaccess before and I checked it was identical to an new grav installation from scratch.
Your statement “I use the base .htaccess file and tried to tweak it with RewriteBase /
and commenting Options -Indexes
.” is a bit confusing if you haven’t changed anything. I also was initially under the impression you might have altered the .htaccess.
The version of grav before the upgrade was v1.6.19 according to the changelog.md file
I don’t have a http://kravclub.fr/config folder or something like that or redirects inside the frontmatter of my pages.
I’ll try without the redirects in /user/config/site.yaml
EDIT: i checked the frontmatter redir
@kravclub.fr,
The version of grav before the upgrade was v1.6.19 according to the changelog.md file
There are many, many incompatibilities and breaking changes between 1.6 and 1.7. I suggest to read the entire docs on upgrading from 1.6 to 1.7.
You might also want to check if plugins are compatible with 1.7.
2 Likes
I started reading the migration doc, but I realize I didn’t mention that the site works fine if I start a local server on my dev computer with php -S localhost:8080 system/router.php
.
Okay,
The issue was beetween Chair And Keyboard : the user
directory was not transfered by my ftp client as it was a simlink.
I don’t know why this caused redirection errors, but now every thing seems fine.
Thanks for your support