Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

URL Redirects not working!

Solved by pamtbaau View solution

Started by Sarah L 6 years ago · 5 replies · 1496 views
6 years ago

Hey,

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

redirects|690x179

What am I doing wrong?

6 years ago

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

6 years ago Solution

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

In my default Grav 1.6.26 install:

Failing: Error 404

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

Working:

TXT
redirects:
  '/xxx': '/typography'  <-- with indentation
👍 1
last edited 08/19/20 by pamtbaau
6 years ago

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

Suggested topics

Topic Participants Replies Views Activity
Support · by gravinator, 1 month ago
5 441 10 minutes ago
Support · by stell, 7 days ago
4 235 5 days ago
Support · by Gravver, 2 weeks ago
6 278 1 week ago
Support · by Marcel, 4 weeks ago
2 337 1 week ago
Support · by blu3prince, 2 weeks ago
1 252 2 weeks ago