Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

URL Redirects not working!

Solved by pamtbaau View solution

Started by Sarah L 6 years ago · 5 replies · 1700 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 TomW, 2 weeks ago
8 227 8 hours ago
Support · by alex, 2 months ago
8 667 23 hours ago
Support · by Supple, 5 days ago
1 98 1 day ago
Support · by TomW, 1 week ago
3 159 3 days ago
Support · by TomW, 6 days ago
2 106 5 days ago