【问题标题】:How to change URL in case of 404 page in MagentoMagento中出现404页面时如何更改URL
【发布时间】:2013-07-16 03:12:18
【问题描述】:

当我输入未找到的 URL 时,我会重定向到 404 页面。

但是我需要的Url也应该改成404notfound页面。

所以如果是 404,我的网址应该是 www.mysite.com/404notfound。

请给我建议。

我尝试创建新的 404 cms 页面并分配给 noroute。但 URL 仍然没有改变。

我也尝试更改 CMS 404 页面路由,但出现 Magento 错误并显示错误代码。

【问题讨论】:

    标签: magento content-management-system http-status-code-404


    【解决方案1】:

    这应该在.htaccess 级别使用以下行进行处理:

    ErrorDocument 404 /404notfound

    【讨论】:

    • 感谢您的回复。它不会更改 URL。我也清除了缓存。
    【解决方案2】:

    我已经通过在函数末尾添加单行来解决这个问题, cms/indexController/noRouteAction

    $this->_redirect($pageId);

    【讨论】:

      猜你喜欢
      • 2012-08-20
      • 2012-11-10
      • 2016-09-06
      • 2010-09-17
      • 1970-01-01
      • 2014-07-06
      • 2012-03-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多