这个路径,apache可以加载.htaccess,进行路由重写
options +followsymlinks
rewriteengine on
rewritecond %{request_filename} !-d
rewritecond %{request_filename} !-f
rewriterule ^(.*)$ index.php/$1 [qsa,pt,l]
那nginx要怎么配置路由重写呢
回复内容: index.php/api/sendems/sendcode.html
这个路径,apache可以加载.htaccess,进行路由重写
options +followsymlinks
rewriteengine on
rewritecond %{request_filename} !-d
rewritecond %{request_filename} !-f
rewriterule ^(.*)$ index.php/$1 [qsa,pt,l]
那nginx要怎么配置路由重写呢
配置文件中增加
rewrite ^(.*)$ /index.php?s=$1 last;