Y
Y
yakyn2018-05-06 00:04:38
Nginx
yakyn, 2018-05-06 00:04:38

How to edit Rewrite in Nginx (download php file)?

I'm migrating a site from Apache to NGIX. Unable to configure config.
There is a task in the following there is a rule in .htaccees
RewriteRule ^(strana)/([^/]*)(/?)+$ index.php?do=xfsearch&xn=$1&xf=$2 [L]
Through the convector I get:
rewrite ^/ (strana)/([^/]*)(/?)+$ /index.php?do=xfsearch&xn=$1&xf=$2 last;
And now everything seems to be fine, a link like www.mysite/strana/Russia opens normally, but if you put a slash / at the end, then the browser offers to download the file.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Ainur Valiev, 2018-05-06
@vaajnur

works, and with a slash

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question