2013-09-27 29 views
0

我有默认安装的codeigniter。在我的public_html文件夹(根)我创建了js文件夹。里面,我有一个tinymce(富文本编辑器)。在该文件夹下有一个tinymce.min.js文件。当我在浏览器中键入此,我无法看到文件的内容:codeigntier和文件位置

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

它显示我笨的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'; 

什么能说,它是导致这个错误?为什么它不能找到并显示文件内容?这是我认为问题的根源。

在此先感谢!

回答

1

,你可以在你的htaccess文件试试这个条件

RewriteCond $1 !^(index\.php|js|images|robots\.txt) 
+0

优秀,效果不错。谢谢 – spacemonkey

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