我直接在Assets文件夹下有一些css .map文件,但是由于某些原因,它们无法加载,并且在调度程序和路由器中出现404错误。关于如何解决此问题的任何解决方案?我将以下配置添加到路由器,但仍然收到错误。
$router->add(
'/assets/css/dashboard-free.css.map'
);
错误日志显示
example.com/assets/css/dashboard-free.css.map:
2019-02-13 07:02:58:
Phalcon\Mvc\Dispatcher\Exception: IndexController handler class cannot be loaded
File=/var/.../Module.php
Line=27
#0 [internal function]: Phalcon\Mvc\Dispatcher->_throwDispatchException('IndexController...', 2)
#1 [internal function]: Phalcon\Dispatcher->dispatch()
#2 /var/.../Module.php(27): Phalcon\Mvc\Application->handle()
#3 /var/.../web/index.php(12): Admin\Module->main()
#4 {main}
答案 0 :(得分:0)
在您的.htaccess
文件中尝试
AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)\.(\d+)\.(bmp|css|cur|gif|ico|jpe?g|js|png|svgz?|webp|webmanifest)$ $1.$3 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^((?s).*)$ index.php?_url=/$1 [QSA,L]
</IfModule>
location ~* (.+)\.(?:\w+)\.(bmp|css|cur|gif|ico|jpe?g|m?js|png|svgz?|webp|webmanifest)$ {
try_files $uri $1.$2;
}
答案 1 :(得分:0)
我认为这与phalcon或php无关 我会检查css文件中的地图路径
/*# sourceMappingURL=dashboard-free.css.map */