URL Redirects not working!


I’ve been trying to fix an issue with redirects not working and can’t figure it out, a fresh pair of eyes would be much appreciated.

I moved by blog a few years ago to Grav and some URLs changed, and I had redirects set up to send people to the new URL.

But the redirects no longer seem to be working.

I have the redirects set up in system/config/site.yaml

What am I doing wrong?

If I were you I would set the redirects in the Grav .htaccess file.

@bleutzinn, I’m curious why… Would you mind sharing some arguments?

@techielass, I’m missing the indentation in the image you are sharing.

In my default Grav 1.6.26 install:

Failing: Error 404

'/xxx': '/typography'    <-- no indentation


  '/xxx': '/typography'  <-- with indentation

That worked, thank you! I knew a second pair of eyes out notice the issue. Thanks.

Some time ago I had problems with custom routes and redirects. They simply didn’t work.

Later the probable cause was in that I was also using a custom slug in the page frontmatter. Somehow this confused Grav. But by then I had already switched to doing redirects before Grav comes into play. Just to avoid complications.