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

Default route override not working?

Solved by pamtbaau View solution

Started by Robert 8 years ago · 3 replies · 583 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 Paul Hodges, 4 weeks ago
19 485 5 days ago
Support · by Lauw, 7 days ago
2 99 7 days ago
Support · by Anna, 3 weeks ago
4 426 1 week ago
Support · by gtx, 4 weeks ago
4 377 3 weeks ago
Support · by Anna, 1 month ago
9 484 3 weeks ago