Answer the question
In order to leave comments, you need to log in
How to write rewrite in nginx?
Welcome all!
There is such a link index.php/topic,8128.25.html, where 8128 is the id of the topic, and 25 is the 2nd page, 24 messages are shown on one page in the topic.
Tell me how can I get such a link /community/topic8128/page2/ ?
Answer the question
In order to leave comments, you need to log in
If you need to make a permanent redirect, then try this:
location /index.php {
rewrite ^/index\.php/topic,([0-9]+)\.([0-9])[0-9]+\.html$ /community/topic$1/page$2 permanent;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question