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

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 학습자의 빠른 성장을 도와주세요!