我目前正在使用CodeIgniter 3.它正在我的笔记本电脑上工作。 但是当我将它上传到我的Centos 6.9服务器时......我遇到了一个错误。 我已经检查了mod_rewrite是否已加载。
I want it to be like this URL/controller/method (no index.php after URL)
It shows me a 404 when i try to login which redirect me to this URL/gate/login
I also set this....
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';
My htaccess on /var/www/html/calllist
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /calllist/index.php?/$1 [L]
</IfModule>
My httpd.conf
DocumentRoot "/var/www/html"
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<VirtualHost *:80>
ServerAdmin webmaster@xxxx.com
DocumentRoot /var/www/html/calllist
ServerName www.xxxx.com
ErrorLog /var/www/html/calllist/error_log
CustomLog /var/www/html/calllist/requests.log common
</VirtualHost>
答案 0 :(得分:0)
我把它添加到我的虚拟主机
<Directory "/var/www/html/calllist">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>