Php 添加外部css文件时获取内部服务器错误500

Php 添加外部css文件时获取内部服务器错误500,php,twitter-bootstrap,.htaccess,codeigniter,Php,Twitter Bootstrap,.htaccess,Codeigniter,我正在使用codeigniter和bootstrap 3。问题是,当我尝试在我的项目中添加boostrap css文件时,我遇到了错误。当我从下面的代码中删除链接标记时,错误得到了修复。为什么会出现此错误以及如何修复此错误?请帮助我 <!DOCTYPE html> <html> <head> <meta content="text/html;charset=utf-8" http-equiv="Content-Type">

我正在使用codeigniter和bootstrap 3。问题是,当我尝试在我的项目中添加boostrap css文件时,我遇到了错误。当我从下面的代码中删除链接标记时,错误得到了修复。为什么会出现此错误以及如何修复此错误?请帮助我

<!DOCTYPE html>
<html>
  <head>
      <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
      <meta content="utf-8" http-equiv="encoding">
      <link rel='stylesheet' type='text/css' href='<?php echo base_url("assets/css/bootstrap.min.css"); ?>' >


  </head>
<body>

<h1>this is index</h1>
</body>

</html>
并从以下内容中删除index.php

$config['base_url'] = 'http://localhost/mycodeigniter/ci/index.php';
$config['index_page'] = '';
在根目录中的htaccess文件中,我粘贴了以下代码以删除index.php表单url

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

$config['base\u url']
中删除
index.php
,因为重写规则会从url中删除
index.php
。因此,仍然将其包含在基本url中是没有意义的
我猜你的问题是因为你没有启用mod\u rewrite
Apache modulemod_rewrite是重写规则工作所必需的。

这里不需要index.php
$config['base_url']='http://localhost/mycodeigniter/';尝试使用$config['base\u url']=''时错误保持不变