我在从网址中删除index.php
时遇到问题..我已经尝试了很多Google提示但没有成功。我使用mac os x yosemite,php 5.5.0和Apache 2.4.10。请问有没有人知道发生了什么?
的.htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
的config.php
$config['base_url'] ='http://localhost/~veniciobr/iTicket';
$config['index_page'] = '';
答案 0 :(得分:0)
别忘了重写基础:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /~veniciobr/iTicket/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
重启Apache并检查你的mod_rewrite扩展名是否已启用。
答案 1 :(得分:0)
这为我工作
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /iTicket/index.php?/$1 [L]