1

我在一个 prestashop 网站上工作,几乎就在那里,但由于某种原因,404 页面没有正确显示,我不知道为什么。

http://www.exclusivetech.co.uk/pagenotfound

谁能解释它为什么会这样做?

这是 PageNotFoundController

class PageNotFoundControllerCore extends FrontController
{
    public $php_self = '404';
    public $page_name = 'pagenotfound';

    /**
     * Assign template vars related to page content
     * @see FrontController::initContent()
     */
    public function initContent()
    {
        header('HTTP/1.1 404 Not Found');
        header('Status: 404 Not Found');
        parent::initContent();

        $this->setTemplate(_PS_THEME_DIR_.'404.tpl');
    }

    public function canonicalRedirection($canonical_url = '')
    {
        // 404 - no need to redirect to the canonical url
    }
}

这是 404.tpl,没有碰过它只是他们的默认值。

<h1>{l s='Page not available'}</h1>

    <p>
        {l s='Were sorry, but the Web address you entered is no longer available'}
    </p>

    <h3>{l s='To find a product, please type its name in the field below'}</h3>
    <form action="{$link->getPageLink('search')}" method="post" class="std">
        <fieldset>
            <p>
                <label for="search">{l s='Search our product catalog:'}</label>
                <input id="search_query" name="search_query" type="text" />
                <input type="submit" name="Submit" value="OK" class="button_small" />
            </p>
        </fieldset>
    </form>

    <a href="{$base_dir}" title="{l s='Home'}">{l s='Home'}</a>
4

1 回答 1

0

看起来页面页脚由于某种原因具有样式“显示:无”

于 2013-03-19T12:22:19.500 回答