S
S
Sergey Pugovkin2017-02-08 16:20:37
Nginx
Sergey Pugovkin, 2017-02-08 16:20:37

How to give php files for download?

How to give php files for download? Only for a url of this kind: site.ru/f/-/123/456/abc.php
Here is another question, how to correctly compose a location, should, of course, be a priority than this one:

location / {
...
}

While I'm thinking this:
location ~ ^/f/-/[0-9]+/[0-9]+/[a-z0-9_\-]+\.php$ {
    default_type application/octet-stream;
    try_files $uri =404;
}

Norm?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Camaro67, 2017-09-21
@Camaro67

As an option

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question