【发布时间】:2017-09-15 11:09:01
【问题描述】:
这是我的第一个问题。
我在 CodeIgniter 中开发了一个 Web 应用程序。它在带有 apache 的 ubuntu 上运行良好。但是当我将它上传到我的服务器时,它不再工作了。服务器使用 NGINX。
我正在使用 .htaccess 从 URL 中删除 index.php。
这是我的 .htaccess 文件:
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
如果我不这样做并保留 index.php,它就可以正常工作。 我该怎么办?
【问题讨论】:
标签: php apache .htaccess codeigniter nginx