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 →

Default route override not working?

Solved by pamtbaau View solution

Started by Robert 8 years ago · 3 replies · 748 views
8 years ago

I have a page with the folder name lorem-ipsum, but want to use the wordpress style, so I was trying to set the default route override for the page to 2018/08/03/lorem-ipsum. When I refresh the blog home page, the new route is used for the link, but when I click it, I get a 404 error.

I have also tried to replace the '/' with an 'x', but that does not matter.

So my assumtion is, that page level default route overrides are not working?

Does anyone know why?

8 years ago Solution

@metbril Prepend the default route in the frontmatter with a slash... See Routes

YAML
routes:
  default: '/2018/08/03/lorem-ipsum'
👍 1
8 years ago

@pamtbaau:
Prepend [...] with a slash

That worked. My mistake. :man_facepalming:

8 years ago

Maybe you need to check your 'bril' at the optician? 😉

👍 1

Suggested topics

Topic Participants Replies Views Activity
Support · by TomW, 2 weeks ago
8 227 9 hours ago
Support · by alex, 2 months ago
8 667 24 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