4
4
4sadly2019-11-18 18:26:33
Nginx
4sadly, 2019-11-18 18:26:33

How to make a static file to all subfolders?

I want my site to open a file in the /var/www/mysite/public_html/static/index.php folder when accessing /static/***, that is, if there is /static/ in the address bar, it will give this file.
How to configure nginx for this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2019-11-18
@4sadly

server {
    rewrite ^/static/ /static/index.php;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question