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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Archive

URL Rewrite

Started by Muut Archive 9 years ago · 0 replies · 375 views
9 years ago

I am currently trying to rewrite some URLs because I somehow need to get data from one page to another and these values are passed by params in the url. But in the end I don't want to have these params in the URL so I am trying around with Rewrite and Redirect.

This is the following that I have:

TXT
redirects:
    /page/subpage/param1:([0-9]+)\/param2:(.+)$': '/page/subpage/$1/$2'

But unfortunately this is not working. Param1 is just a numeric ID (4 digits) where Param2 is a string like Url (some-nice-url-here) all lowercase with dashes in between). So I am wondering if my rewrite approach is possible at all or not. Or maybe I am doing something wrong with the Regex parameters?

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1282 9 years ago
Archive · by Muut Archive, 9 years ago
2 889 9 years ago
Archive · by Muut Archive, 9 years ago
2 4019 9 years ago
Archive · by Muut Archive, 9 years ago
1 2894 9 years ago
Archive · by Muut Archive, 9 years ago
3 1078 9 years ago