Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Default route override not working?

Solved by pamtbaau View solution

Started by Robert 8 years ago · 3 replies · 647 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 webmasterodp, 1 week ago
4 158 6 days ago
Support · by nwhitfield, 1 week ago
2 137 1 week ago
Support · by stell, 3 weeks ago
5 369 2 weeks ago
Support · by gravinator, 1 month ago
5 560 2 weeks ago
Support · by Gravver, 3 weeks ago
6 348 3 weeks ago