K
K
ktonado2018-03-12 12:30:53
Nginx
ktonado, 2018-03-12 12:30:53

How to properly make a CNC rewrite rule for nginx?

the essence of the task - cnc.
not enough brains, help!!
incoming address string /qwe/vdf/39dff/34
to be divided into 2 groups of values
​​mode = qwe/vdf/39dff
id = 34
rewrite ^/(([a-z0-9~_-]+/)+)([ 0-9]+/?)$ /index.php?mode=$1&id=$3 last;
how to make a regular

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nick Sdk, 2018-03-12
@ktonado

probably:
https://regex101.com/r/hinjdv/2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question