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

Case insensitive redirects

Started by Muut Archive 10 years ago · 1 replies · 439 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 1369 9 years ago
Archive · by Muut Archive, 9 years ago
2 942 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2960 9 years ago
Archive · by Muut Archive, 9 years ago
3 1125 9 years ago