1

我在本地 zend 服务器 6 上运行的 zend 应用程序返回未找到所有图像、css 和 javascript 文件。

我的 .htaccess 在公共场合包含:

   RewriteEngine On
   RewriteCond %{REQUEST_FILENAME} -s [OR]
   RewriteCond %{REQUEST_FILENAME} -l 
   RewriteRule ^.*$ - [NC,L]
   RewriteRule ^.*$ index.php [NC,L]

routes.ini 包含

    [production]
    routes.default.type = "Zend_Controller_Router_Route_Hostname"
    routes.default.route = "dev.localhost.com"
    routes.default.defaults.module = "default"
    routes.default.defaults.media = "media"

    ;-------------------------------------------------------------------------------
    ; Default Route - Default Behaviour 
    ;-------------------------------------------------------------------------------
    routes.default.chains.index.route = ":controller/:action/*"
    routes.default.chains.index.type = "Zend_Controller_Router_Route"
    routes.default.chains.index.defaults.controller = "index"
    routes.default.chains.index.defaults.action = "index"

我称之为

    <img src="<?= $this->baseUrl('images/logo.png'); ?>"/>
    <link rel="stylesheet" type="text/css" href="<?php echo$this->baseUrl('css/grid.css')?>"/>
    <link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl('css/styles.css')?>" />
    <?php $this->headScript()->prependFile($this->baseUrl('js/jquery-ui-1.8.17.custom.js'));

?>

所有这些都返回未找到的错误,基本 url 设置为“/”
或“ http://dev.localhost.com

非常感谢任何帮助

4

0 回答 0