2012-01-29 65 views
0

我有一个zend框架应用程序在服务器(linux)和本地(窗口) 服务器所有页面运行和加载完美 但在本地(WAMP)服务器某些页面不运行,没有运行没有甚至给错误 多数民众赞成在特殊页面Zend的应用程序没有响应(错误)和浏览器说(页面无法找到。调试zend框架应用程序在加载页面

有一些配置,影响在本地Apache服务器或php.ini的这个错误

它可以说,“在特定页面开发人员使用一些SEO URL识别代码如:example.com/shop-product-brand-blablabla.html

,而像动作控制变量模式: example.com/shop/buy/id/34 多申,T工作,所以 我觉得在控制器中的URL确认是第一个错误的因素 的SEO URL代码

一些行
 $urls[$i] = strtolower($urls[$i]); 
     $urls[$i] = str_replace("&", "-", $urls[$i]); 
     $urls[$i] = preg_replace("/[\/\\\:\*\?\"\<\>\|\# ]/", "_", $urls[$i]); 
     $urls[$i] = $this->view->baseUrl() . '/' . $urls[$i] . '.html'; 
------------------------------------------------------------ 
$this->view->possibleLinks = $this->getPossibleUrl($this->view->item); 
    $this->view->possibleUrls = $this->view->possibleLinks[0]; 

    if ($this->_getParam(3)) 
    { 
     $query = $this->_getParam(3); 
     $url = $this->view->baseUrl() . '/computer-' . $this->_getParam('id') . '-' . $query . '.html'; 

     if (array_search($url, $this->view->possibleUrls) === false) 
      $this->_redirect($this->view->url(array('module'=>'default', 'controller'=>'productscomputer', 'action'=>'list'), 'shop_computers')); 
    } else { 
     $this->_redirect($this->view->possibleUrls[0]); 
    } 

回答

0

我认为Zend Framework应用程序所需的.htaccess文件不起作用。

确保.htaccess文件位于Windows服务器上的公用文件夹中。

还要确保.htaccess文件安装目录中允许使用.htaccess文件。必须为该目录设置AllowOverride All(@see AllowOverride)。

当此指令设置为None时,则完全忽略.htaccess文件。在这种情况下,服务器甚至不会尝试读取文件系统中的.htaccess文件。

当此指令设置为All时,那么在.htaccess文件中允许任何具有.htaccess上下文的指令。