Apache 丢失 Post 数据

浏览:1133 发布日期:2017/03/30 分类:求助交流 关键字: Apache 单一入口 post
场景:把单向入口做的跟彻底,即把访问文件夹或不存的文件指向index.php入口。于是把.htaccess中的 RewriteCond %{REQUEST_FILENAME} !-d 注释掉。
最终配置如下:
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine on
#RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1
</IfModule>

这样就出现问题了
例:项目App中有个目录Api
https://xxxx/Api 这样访问就会丢失Post数据
https://xxxx/Api/ 这样访问不会丢失Post数据
当Api目录不存在是两种访问都没问题





最佳答案
评论( 相关
后面还有条评论,点击查看>>