我的.htaccess文件配置有问题。应用程序是用AngularJs编写的,而restApi应用程序是用Codeigniter编写的,它位于/ server文件夹中。
这是我正在处理的.htaccess文件
RewriteEngine on
RewriteCond $1 !^(index\.php|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
问题在于,当我尝试访问我的api资源时,我会继续获取404页面,而这在我的debian nginx服务器上完美运行,这就是为什么我猜这个是.htaccess文件中的问题
http://myApp.com/server/api/products/latest/1
我希望你们能帮助我。如果您需要任何其他信息,请告诉我,我会提供。提前谢谢。
答案 0 :(得分:1)
尝试.htaccess
RewriteBase /server/
还要确保在config.php中
$config['index_page'] = ' ';