Codeigniter 当我进入**www.domain.com/controller时,无法在打开的url上加载网站**
我已经在CodeignatorCI中开发了该应用程序。网站id在本地计算机上正常运行。 我的密码如下Codeigniter 当我进入**www.domain.com/controller时,无法在打开的url上加载网站**,codeigniter,Codeigniter,我已经在CodeignatorCI中开发了该应用程序。网站id在本地计算机上正常运行。 我的密码如下 <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /ROOT DIRECTORY NAME/ # Directs all EE web requests through the site index file RewriteCond %{REQUEST_FILENAME} !-f Re
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /ROOT DIRECTORY NAME/
# Directs all EE web requests through the site index file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
我在route.php中为默认的\u控制器指定了控制器名称
请让我知道我错了吗
哎呀,在你的文件夹结构中,你忘了上传系统文件夹。它会解决你所有的问题
在config/config.php
中(更改此项)
在.htaccess
(应用程序文件夹的外侧)中替换此
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
重新启动发动机
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则^(.*)$index.php/$1[L]
很难知道您在哪里出错。除非我们知道您的CI-3版本是什么?控制器名称、控制器功能和路由是什么。php错误消息是什么?是否出现系统目录?我认为您的应用程序目录不完整;除了应用程序
目录之外,您还应该有一个系统
目录,其中包含CodeIgniter核心。@Nishant Nair您是否配置了要删除的index.php?如果没有,那么你需要在每个地方使用www.domain.com/index.php/controller
。当系统文件夹丢失时,他说网站id在本地机器上正常运行,这怎么可能
$config['base_url'] = '';
$config['index_page'] = '';
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>