时间:2021-07-01 10:21:17 帮助过:3人阅读
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
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;