X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   404 Page Redirect (https://forum.x-cart.com/showthread.php?t=61681)

TOTVOI 11-17-2011 10:41 PM

404 Page Redirect
 
How would I eliminate the default 404 page in x-cart and just redirect users to the home page?

I tried to do a redirect in htaccess, but I can't even figure out where the 404 page is coming from. I played around with 404.php but didn't have any luck.

JWait 11-18-2011 06:49 AM

Re: 404 Page Redirect
 
look in either skin/common_files/ or skin/YOUR-SKIN and you will find a folder named 404. Inside is the html page that you can edit. I would not recommend putting in a redirect.

cherie 11-20-2011 02:03 PM

Re: 404 Page Redirect
 
You should be able to define the 404 ErrorDocument in .htaccess.

wendy.email 12-11-2013 07:46 AM

Re: 404 Page Redirect
 
how do you redirect 404 to home.php in .htaccess

ErrorDocument 404 http://www.myurl.com/home.php
ErrorDocument 401 http://www.myurl.com/home.php

still not working... any help is greatly appreciated

PhilJ 12-12-2013 02:38 AM

Re: 404 Page Redirect
 
You are better off redirecting 404's to a page where you can provide alternative options for the customer, eg. links to sitemap etc.

To redirect 404 error to a static page, create a new 404 error static page, noting the page ID number.

Then edit /include/func/func.core.php

After...

Code:

@header("HTTP/1.0 404 Not Found");
Insert...
Code:

header('Location: http://www.yourstore.com/pages.php?pageid=123');

Or, to just redirect to the homepage, insert...

Code:

header('Location: http://www.yourstore.com');


All times are GMT -8. The time now is 02:22 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.