【发布时间】:2016-05-01 16:04:20
【问题描述】:
我正在使用 codeigniter,但我的日志文件中不断出现这些 404 错误。
ERROR - 2016-04-30 16:41:15 --> 404 Page Not Found: Assets/js
ERROR - 2016-04-30 16:41:15 --> 404 Page Not Found: Assets/js
ERROR - 2016-04-30 16:41:18 --> 404 Page Not Found: Assets/js
因此,每次页面加载都会导致日志文件中出现上述错误。我的 htaccess 文件如下所示。这里出了什么问题?
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteCond $1 !^(index\.php|assets|myadmin|robots\.txt)
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
我可以确认assets/js 是有效文件夹。
【问题讨论】:
标签: .htaccess codeigniter