1
不能讓我的控制器在Linux上的Apache2工作(從WAMP轉)CodeIgnitor的網址文件沒有在Linux上的Apache2
的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 conf
<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中的'RewriteBase /'條目。 – rvk 2014-09-23 19:36:42