0

我有默认安装的codeigniter。在我的 public_html 文件夹(根)中,我创建了 js 文件夹。在里面我有一个 tinymce(富文本编辑器)。在该文件夹下有一个 tinymce.min.js 文件。当我在浏览器中输入这个时,我看不到文件的内容:

http://mydomain.com/js/tinymce/tinymce.min.js

它向我显示了 codeigniter 404 错误页面。在我的 .htaccess 我有这个:

# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

我的基本网址在 config.php 中定义:

$config['base_url'] = 'http://www.mydomain.com/';

/*
|--------------------------------------------------------------------------
| Index File
|--------------------------------------------------------------------------
|
| Typically this will be your index.php file, unless you've renamed it to
| something else. If you are using mod_rewrite to remove the page set this
| variable so that it is blank.
|
*/
$config['index_page'] = 'index.php';

什么可能导致此错误?为什么无法定位和显示文件内容?在我看来,这是问题的根本原因。

提前致谢!!

4

2 回答 2

1

您可以在您的 htaccess 文件中尝试此条件

RewriteCond $1 !^(index\.php|js|images|robots\.txt)
于 2013-09-27T08:26:32.467 回答
0

用这个:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]

在 config.php

$config['index_page'] = '';   #remove index.php
于 2013-09-27T08:28:59.450 回答