我一直工作在这一个小时了,所以我想我还不如问。
我想从我的CodeIgniter应用程序的URL中删除index.php文件并不能做到这一点。
应用程序是在我的办公室在专用服务器上运行,我通过URL访问应用程序http://smr_local
这是我的基本虚拟主机块
<VirtualHost 192.168.1.90:80>
ServerAdmin admin@server.com
DocumentRoot "/var/www/smr.dev/app"
ServerName smr_local
ErrorLog "/etc/httpd/logs/error_log"
CustomLog "/etc/httpd/logs/access_log" common
<Directory /var/www/smr.dev/app>
Order allow,deny
Allow from all
AllowOverride All
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine on
</IfModule>
</VirtualHost>
这里是我的.htaccess文件
RewriteEngine on
RewriteBase /
# Hide the application and system directories by redirecting the request to index.php
RewriteRule ^(application|system|\.svn) index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [QSA,L]
而我的配置文件
$config['base_url'] = "http://smr_local/";
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';
现在,当我试图访问我的基本URL http://smr_local/user/courses
我得到一个错误在我的Apache错误日志中我得到这个。
File does not exist: /var/www/smr.dev/app/user
我真的不知道下一个尝试的东西。 任何帮助,将不胜感激。