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 →

URL Rewrite

Started by Muut Archive 10 years ago · 0 replies · 581 views
10 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 Muut Archive, 10 years ago
1 672 1 week ago
Archive · by Deleted User, 9 years ago
0 3042 9 years ago
Archive · by Muut Archive, 9 years ago
2 1983 9 years ago
Archive · by Muut Archive, 9 years ago
2 5336 9 years ago
Archive · by Muut Archive, 9 years ago
1 4134 9 years ago