Home > Backend Development > PHP Tutorial > nginx try_files usage

nginx try_files usage

WBOY
Release: 2016-08-08 09:25:38
Original
1785 people have browsed it

Example: Yii2 recommends Hungnix try_files configuration

location / {
    try_files $uri $uri/ /index.php?$agrs;
}
Copy after login

Find the file under the specified path. If it does not exist, transfer it to which file is executed.

try_files
语法: try_files file1 [file2 ... filen] fallback
默认值: 无
作用域: location
Copy after login

The above introduces the usage of nginx try_files, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template