简体   繁体   English

CSS文件未在Codeigniter中加载

[英]CSS file not loading in Codeigniter

I am using codeigniter for one of my project. 我正在为我的项目之一使用codeigniter。 I am facing a problem with CSS. 我遇到CSS问题。 I am not able to load CSS. 我无法加载CSS。 I am getting 404 error while loading the css. 加载CSS时出现404错误。 All my other functions are fine. 我所有其他功能都很好。 Here is my view page- 这是我的查看页面-

<HTML>
 <HEAD>
 <link href="<?php echo base_url(); ?>bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css"  />
  </head>

My .htaccess is 我的.htaccess是

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]

Rest all my functions are working fine. 休息一下,我所有的功能都正常。 I mean I am able to access records via example.com/users/show or example.com/users/show/ 我的意思是我可以通过example.com/users/show或example.com/users/show/访问记录

I think I am missing something. 我想我缺少了一些东西。 Can you please help me in this. 你能帮我吗

Add below code in .htaccess 在.htaccess中添加以下代码

RewriteEngine on
RewriteBase /Project Folder PATH
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L] 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM