Was bedeuten diese Sätze über die Implementierung von Rewrite durch Nginx?
某草草
某草草 2017-05-16 17:13:51
0
1
562
    if (-f $request_filename/index.php){
            rewrite (.*) /index.php;
    }
    if (!-f $request_filename){
            rewrite (.*) /index.php;
    }
某草草
某草草

Antworte allen(1)
黄舟
  if (-f $request_filename/index.php)
#如果存在文件$request_filename/index.php
{
            rewrite (.*) $1/index.php;
            #那么执行这条 rewrite
            # $1代表上面if里匹配的
    }
    if (!-f $request_filename){
    #如果不存在文件$request_filename
            rewrite (.*) /index.php;
            #那么执行这条 rewrite
    }
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage