[英]CodeIgniter URLs File not found on Linux Apache2
Cannot get my controllers working on Linux apache2 (transferred from WAMP) 无法使我的控制器在Linux apache2上工作(从WAMP转移)
config.php config.php文件
$config['base_url'] = 'http://subdomain.domain.com/';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';
apache2 log 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 conf 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 的.htaccess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
Unsure what is wrong. 不确定出什么问题了。
Change your .htaccess file to this: 将您的.htaccess文件更改为此:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
In your config file, try this: 在您的配置文件中,尝试以下操作:
$config['uri_protocol'] = 'AUTO';
That might fix you up. 那可能会修复您。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.