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 · 1272 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 Anna, 18 hours ago
1 56 12 hours ago
Support · by gtx, 1 week ago
4 229 2 days ago
Support · by Paul Hodges, 2 weeks ago
13 277 5 days ago
Support · by Anna, 3 weeks ago
9 335 1 week ago
Support · by TomW, 2 weeks ago
4 189 2 weeks ago