How ThinkPHP allow access when the URL is omitted index.php

How ThinkPHP allow access when the URL is omitted index.php

Nginx server configuration

 

 Modify the file nginx.conf

location / {// ... .. omit part of the code 
   IF (-e $ request_filename!) { 
           the rewrite Last /index.php?s=/$1 ^ $ (*.); 
    } 
}

The original access URL:

http: //serverName/index.php/ module / controller / operator / [parameter name / value parameter ...]

After setting, we can use the following access:

http: // serverName / module / controller / operator / [parameter name / value parameter ...]

 

 

Guess you like

Origin www.cnblogs.com/GetcharZp/p/11717339.html