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 →

Case insensitive redirects

Started by Muut Archive 10 years ago · 1 replies · 554 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 Muut Archive, 10 years ago
1 676 1 week ago
Archive · by Deleted User, 9 years ago
0 3043 9 years ago
Archive · by Muut Archive, 9 years ago
2 1983 9 years ago
Archive · by Muut Archive, 9 years ago
2 5337 9 years ago
Archive · by Muut Archive, 9 years ago
1 4134 9 years ago