Answer the question
In order to leave comments, you need to log in
Why doesn't location work?
Please tell me how to set up such a location, this example does not work.
When typing the address
http://sites/mail
In the address bar of the browser, the path changes to sites/mail, but index.php does not start,
writes File not found .
If you just type the address, then index.php from /var/www/html works
server{
...
root /var/www/html;
index index.php;
location /mail {
return 301 http://sites/mail;
}
location / {
rewrite ^/([^\.]+)$ /$1.php ;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question