![](/img/trans.png)
[英]Linux Ubuntu 14.00 - Apache2 file not found error - where file exists
[英]CodeIgniter URLs File not found on Linux Apache2
无法使我的控制器在Linux apache2上工作(从WAMP转移)
config.php文件
$config['base_url'] = 'http://subdomain.domain.com/';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';
apache2日志
[Tue Sep 23 03:36:08 2014] [error] [client 192.168.1.1] File does not exist: /var/www/subdomain.domain.com/execute
apache2配置文件
<VirtualHost *:80>
ServerName subdomain.domain.com
DocumentRoot /var/www/subdomain.domain.com
<Directory /var/www/subdomain.domain.com>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
的.htaccess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
不确定出什么问题了。
将您的.htaccess文件更改为此:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
在您的配置文件中,尝试以下操作:
$config['uri_protocol'] = 'AUTO';
那可能会修复您。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.