CodeIgniter 3.1无法在服务器上的PHP 5.4中工作



Getting 404 page not found error on Server,which it working fine on local machine

下面是我的.htaccess

RewriteEngine on
RewriteCond $1 !^(index.php|(.*).swf|forums|images|css|downloads|jquery|js|robots.txt|favicon.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php?$1 [L,QSA]

下面是config.php 中的base_url代码

$root=(isset($_SERVER['HTTPS']) ? "https://" : "http://").$_SERVER['HTTP_HOST'];
$root.= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);
$config['base_url'] = $root;

base_url代码/动态URI不应该在"config.php"中,因为它的函数是建立;基本";。将其移动到"root"目录的"index.php"中。

最新更新