Skip to content
Grav 2.0 is officially stable. Read the announcement →
Support

URL Redirects not working!

Solved by pamtbaau View solution

Started by Sarah L 6 years ago · 5 replies · 1253 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 Paul Hodges, 6 days ago
13 218 4 hours ago
Support · by gtx, 4 days ago
2 126 3 days ago
Support · by Anna, 2 weeks ago
9 300 3 days ago
Support · by TomW, 1 week ago
4 164 6 days ago
Support · by Anna, 1 week ago
4 172 7 days ago