【发布时间】:2018-05-31 01:32:30
【问题描述】:
这是我的目录结构
/path/www.mysite.com/ public_html/ 接口/ v1/ 索引.php .htaccess .htaccess 规则: 重写引擎开启 RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d 重写规则 ^(.*)$ index.php/$1 [L]问题:
当我浏览此网址时:http://technobuff.in/api/v1/hello 这不起作用。它显示'未指定输入文件。'
但如果我使用这个:http://technobuff.in/api/v1/index.php/hello 这工作正常。
我正在使用 Slim 框架进行 API 开发。在 localhost 中,这运行良好。请帮忙解释一下。
【问题讨论】:
-
快速浏览.. 注意到你有不同的.htaccess for slim framework。
-
@BagusTesa 谢谢它对我有用。
-
很高兴你把它整理出来。
标签: php .htaccess url-redirection slim