puzzleboy 发表于 2013-4-11 11:06:50

Altair 发表于 2013-4-10 18:30 static/image/common/back.gif
应该是,百度一下

vmware中ubuntu的
config.php中配置
$config['base_url']   = 'localhost/testWeb/';

不知道对不对???? 我是在本地访问虚拟机上的地址http://192.168.136.145

Altair 发表于 2013-4-11 13:05:42

puzzleboy 发表于 2013-4-11 11:06 static/image/common/back.gif
vmware中ubuntu的
config.php中配置
$config['base_url']   = 'localhost/testWeb/';


不是必须设置$config['base_url'],你把它设为空试试$config['base_url']   = 'l';

nop2 发表于 2013-4-13 12:55:08

本帖最后由 nop2 于 2013-4-13 12:57 编辑

不知道楼做了去除index.php没
我把我的环境大概说下吧,因为系统一直用的是ubuntu,所以说的,多少对你来说应该有些用
1:把系统的登录帐号添加到www-data下
2:去/etc/apache2/mods-available 下找到rewrite.load创建个快捷方式扔到mods-enabled目录下
3:修改sites-enabled目录下的xxx-default文件里的AllowOverride None为AllowOverride All
4:在ci根目录下 创建.htaccess文件,内容为
RewriteEngine on   
RewriteCond $1 !^(index\.php|images|robots\.txt)   
RewriteRule ^(.*)$ /ci/index.php/$1    //你是什么目录就修改成什么目录,我这里CI是直接在ci下
5:配置文件 $config['base_url']    = '';//这里设置为空
$config['index_page'] = '';//这里设置为空
6:terminal下,chmod 777 你的CI目录//个人开发环境777无妨啊,生产环境另当别论

希望对你有所帮助
页: 1 [2]
查看完整版本: 安装之后 ubuntu上index.php无法访问