默认控制器(欢迎页面(未加载,也未加载任何其他控制器。除了下面列出的内容外,我没有做任何额外的更改:
已在WAMP上下载并安装CI 2.1.4版本到此目录->http://localhost/ci/
,在我设置了以下配置文件元素之后:
$config['base_url'] = 'http://localhost/ci/';
之后,我将.htaccess从Deny all
设置为:
RewriteEngine on
RewriteBase /ci/
RewriteCond $1 !^(index'.php|images|css|js|robots'.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
如有任何建议,我们将不胜感激。
谢谢。
无需设置您的基本url:
$config['base_url'] = ' ';
RewriteEngine on
RewriteCond $1 !^(index.php|images|css|js|robots.txt|favicon.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
试试这个。htaccess:
RewriteEngine on
RewriteCond $1 !^(index'.php|images|robots'.txt)
RewriteRule ^(.*)$ /ci/index.php/$1 [L]
感谢大家帮助我设置CodeIgniter 2.1.4版本。我最初下载的软件包似乎有问题。删除目录并再次下载CI文件后,一切正常。