0
votes

I have an zend framework application on server(linux) and local(windows) in server all page run and load perfectly but in local (WAMP) server some page doesn,t run without even giving error in thats special pages zend application have no response(error) and browser say (the page couldn't found.

is there some configuration that affects this error in local apache server or php.ini

it,s good to say "in that specific page developer use some SEO URL recognized code Like: example.com/shop-product-brand-blablabla.html

while the action controller variable pattern like: example.com/shop/buy/id/34 dosen,t work so i think the url recognization in controller is first error factor some line of SEO URL code

        $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]);
    }
1

1 Answers

0
votes

I think the .htaccess file required for Zend Framework application is not working.

Make sure the .htaccess file is in the public folder on the Windows server.

Also make sure the directory the .htaccess file is installed in is allowed to use .htaccess files. AllowOverride All must be set for that directory (@see AllowOverride).

When this directive is set to None, then .htaccess files are completely ignored. In this case, the server will not even attempt to read .htaccess files in the filesystem.

When this directive is set to All, then any directive which has the .htaccess Context is allowed in .htaccess files.