I wrote an interface using the path localhostapiwebindex. php? The code of rusertestactiontest is echo & #039; 123 & #039; according to the online tutorial, configure urlmanager. the code is as follows {code ...} then Configure nginx rewritelisten80; {code ...} sincerely... I wrote an interface using the path localhost/api/web/index. php? R = user/test
The code of actiontest is echo '123 ';
Configure urlmanager according to the tutorial on the internet. the code is as follows:
'Urlmanager' => ['enableprettyurl' => true, // beautify url = ture 'enablestrictparsing' => false, // strict parsing not enabled 'showscriptname' => false, // hide the index. php 'rules' => ['
/'=>'
/',],],
Then configure nginx rewrite
Listen 80;
Server_name localhost; location/{root D:/Github/Server/advanced; index. php index.html index.htm; # enable rewirte if (! -E $ request_filename) {rewrite ^/(. *)/index. php? R = $1 last ;}
Sincerely solve,
Reply content:
I wrote an interface using the path localhost/api/web/index. php? R = user/test
The code of actiontest is echo '123 ';
Configure urlmanager according to the tutorial on the internet. the code is as follows:
'Urlmanager' => ['enableprettyurl' => true, // beautify url = ture 'enablestrictparsing' => false, // strict parsing not enabled 'showscriptname' => false, // hide the index. php 'rules' => ['
/'=>'
/',],],
Then configure nginx rewrite
Listen 80;
Server_name localhost; location/{root D:/Github/Server/advanced; index. php index.html index.htm; # enable rewirte if (! -E $ request_filename) {rewrite ^/(. *)/index. php? R = $1 last ;}
Sincerely solve,