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

Case insensitive redirects

Started by Muut Archive 10 years ago · 1 replies · 527 views
10 years ago

Is there any way to make site.yaml redirects case insensitive?

TXT
redirects:
    /page:       /folder/page

I want a user to be able to type in http://myurl.com/paGe and be redirected to http://myurl.com/folder/page.

I can do goofy OR regex groups, but it gets silly as the url gets long. I'm hoping someone has a better solution.

TXT
redirects:
    /(p|P)(a|A)(g|G)(E|e):       /folder/page
10 years ago

Try using the case insensitive modifier (not tested):

TXT

redirects:
    (?i)\/page:       /folder/page
---

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 2602 9 years ago
Archive · by Muut Archive, 9 years ago
2 1711 9 years ago
Archive · by Muut Archive, 9 years ago
2 5004 9 years ago
Archive · by Muut Archive, 9 years ago
1 3836 9 years ago
Archive · by Muut Archive, 9 years ago
3 1818 9 years ago