【发布时间】:2017-05-24 14:42:05
【问题描述】:
我正在使用 Zend Framework 1,一切正常,除了一件事。我的网站不加载资产。我知道这可能是 .htaccess 的问题,但我尝试了很多方法来解决这个问题,但没有成功。
我的文件夹结构是:
|- /
|---application
|---library
|---public
|------assets
|------cgi-bin
|------images
|---resources
我的 .htaccess 文件(在 /public 文件夹内):
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
不幸的是,当我访问该网站时,它会加载所有内容,但位于我的 /public/assets 和 /public/images 文件夹中的文件除外。当我尝试通过 URL 访问文件时,ZEND 会返回“找不到页面”错误。
谁知道我该如何解决这个问题?
谢谢!
【问题讨论】:
标签: php css .htaccess zend-framework assets