I'm having a real problem with this because I just can't get my head around regexes.
I'm using Cherokee Web Server and I'm trying to use a regex to perform a redirection.
I need to开发者_如何学Go get the following url (for example)
/parts/tr/accessories/tyres
to the controller like this
index.php?page=parts&catalogue=tr&category=accessories&subcategory=tyres
can somebody help me please!
Thanks
I am not familiar with Cherokee, but the regex would be:
([^/]+)/([^/]+)/([^/]+)/([^/]+)
and replacement pattern would look like:
index.php?page=$1&catalogue=$2&category=$3&subcategory=$4
精彩评论