Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

How to Redirect 404 to Home Page Rate Topic   - - - - -

 
  • powerfix
  • Junior Member
  • Members
  • Join Date: 07-Nov 09
  • 33 posts

Posted 25 August 2013 - 07:21 PM #1

How to Redirect 404 to Home Page

 
  • Hungryweb
  • Senior Member
  • Authorized Reseller
  • Join Date: 10-Feb 12
  • 1278 posts

Posted 25 August 2013 - 08:40 PM #2

A simple way for v3Pro is:
  • activate My Changes addon, if is not yet activated ;)
  • copy code bellow to file skins/basic/customer/addons/my_changes/overrides/exception.tpl
    <meta http-equiv="refresh" content="0;url={""|fn_url}" />
  • clear cache (?cc) in admin area

Be careful this is a bad think for seo ;)

[ Tested on CS-Cart v.3.0.6 Professional ]

I hope that helps,

---
Valentin
part of hungryweb.net

 
  • powerfix
  • Junior Member
  • Members
  • Join Date: 07-Nov 09
  • 33 posts

Posted 26 August 2013 - 03:44 PM #3

Thank You

 
  • Hungryweb
  • Senior Member
  • Authorized Reseller
  • Join Date: 10-Feb 12
  • 1278 posts

Posted 26 August 2013 - 07:09 PM #4

You are welcome.

 
  • meetshamee
  • Advanced Member
  • Trial users
  • Join Date: 12-Feb 13
  • 92 posts

Posted 17 September 2013 - 11:13 AM #5

Redirect to a custom 404 error page

1) Create a custom page in the root directory of your CS-Cart installation (or to redirect to the homepage, use index.php)
2) In "fn.control.php" file located in the "core" directory of your CS-Cart installation, replace the following part of code:
 if ($status == CONTROLLER_STATUS_NO_PAGE) {
header(' ', true, 404);
}


with this one:

 if ($status == CONTROLLER_STATUS_NO_PAGE) {
fn_redirect(Registry::get('config.http_location') . "/NEWURL");
}


Note: In the new code, you would replace "NEWURL" with the name of the new page.
Example, to redirect to the homepage:


 if ($status == CONTROLLER_STATUS_NO_PAGE) {
fn_redirect(Registry::get('config.http_location') . "/index.php");
}


 
  • grabbags
  • Senior Member
  • Members
  • Join Date: 14-Aug 07
  • 360 posts

Posted 30 September 2013 - 09:43 PM #6

thank you!

 
  • meetshamee
  • Advanced Member
  • Trial users
  • Join Date: 12-Feb 13
  • 92 posts

Posted 05 October 2013 - 07:18 PM #7

welcome

 
  • abssoft
  • Senior Member
  • Authorized Reseller
  • Join Date: 18-Jul 14
  • 391 posts

Posted 06 November 2014 - 07:59 PM #8

Hello,

We have developed "CS-Cart 404 custom redirect add-on" and installed more than 10+ CS-Cart website.

Please check here for more details.

Thankyou.
We are leading CS-Cart Customization Development and CS-Cart Add-ons, Responsive Theme Development Company in (Pondicherry and Chennai) India and UK.
Please click here to get a Free Estimation.