lyszpaj 发表于 2012-11-2 08:49:50

路径中去除index.php后外联样式不起作用?

本帖最后由 lyszpaj 于 2012-11-2 09:48 编辑

问题是这样的,本来外联样式表是起作用的:
在head区<base href="<?=base_url()?>"/>
<link rel="stylesheet" type="text/css" href="style/new.css"> //style文件夹在根目录下
我在.htaccess文件中设置将index.php去除后其他都ok,就是样式不起作用了,求帮助!

lyszpaj 发表于 2012-11-2 09:36:22

:@:@:@

Shengzhi 发表于 2012-11-2 11:18:17

访问CSS文件是否会提示403错误?
是的话请尝试更改.htaccess文件中的重写规则

lyszpaj 发表于 2012-11-2 13:46:48

没有错误,页面都能打开,数据库调用也成功,就是样式不起作用。晕死!
附上页面html代码:<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<base />
<title>Ci_新闻发布系统</title>
<link rel="stylesheet" type="text/css" href="style/new.css">
</head>

lyszpaj 发表于 2012-11-2 13:54:18

ok了!在RewriteCond $1 !^(index\.php|images|style|robots\.txt)   中加上sytle
页: [1]
查看完整版本: 路径中去除index.php后外联样式不起作用?