Magento 1.8 only some CMS pages 302 redirects to home page

时间:2017-06-09 12:52:56

标签: php .htaccess magento redirect content-management-system

I've got a problem with my Magento CMS pages. On my homepage I've got footer links that bring the customer to CMS pages with success when they're clicked.

I tried to add 2 more links with their own CMS pages and impossible to access them. The working links look like this:

<li class="uppercase"><a href="<?php echo $this->getUrl('qui-sommes-nous') ?>" title="<?php echo $this->__('Who are we ?') ?>"><?php echo $this->__('Who are we ?') ?></a></li>

Then, for the same code with the correct link it redirects my link to the homepage with a 302 code.

I went to a redirect checker website and it said that I had 302 redirects on the homepage when I click only on my new links only.

I already did the following: Go to my admin panel to uncheck Redirect to Base Url;

Go to {MagentoRootFolder}/app/etc/modules and remove modules one by one to see if there is a module that creates the issue.

Look in my .htaccess to comment Redirect directives.

I don't find the origin of this redirection if someone could help.

Thanks.

2 个答案:

答案 0 :(得分:0)

尝试更改CMS网页网址密钥,然后尝试。您也可以在URL Rewrite部分中查看它。是否有任何规则为这些CMS页面定义。

答案 1 :(得分:0)

我发现了问题。

这是因为以前的开发人员将模块观察器中的所有CMS页面列入黑名单,但是主页上的那些(有效的那些)被列入白名单,所以我将CMS页面添加到白名单中,现在工作正常。

if (Mage::getStoreConfig('privatesales/forcelogin/enable')) {

        $requestPathWhiteList = array(

            '[Path you want to whitelist]',
            '[Path you want to whitelist]',
            '[Path you want to whitelist]',
            '[Path you want to whitelist]',
            '[Path you want to whitelist]',
        );

        $cmsPageIdentifierWhiteList = array(
            '[URL KEY of your cms page you want to whitelist]',
            '[URL KEY of your cms page you want to whitelist]',
            '[URL KEY of your cms page you want to whitelist]',
        );
相关问题