php - nginx下tp如何配置路由重写
阿神
阿神 2017-04-11 10:27:00
0
1
614

index.php/Api/Sendems/sendCode.html
这个路径,apache可以加载.htaccess,进行路由重写
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
那nginx要怎么配置路由重写呢

阿神
阿神

闭关修行中......

全部回复(1)
阿神

配置文件中增加

 rewrite  ^(.*)$  /index.php?s=$1  last;
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!