Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

404 Page Redirect

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-17-2011, 10:41 PM
 
TOTVOI TOTVOI is offline
 

Member
  
Join Date: Nov 2011
Posts: 13
 

Default 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.
__________________
X-CART GOLD 4.4.4
Reply With Quote
  #2  
Old 11-18-2011, 06:49 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default 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.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote

The following user thanks JWait for this useful post:
TOTVOI (11-22-2011)
  #3  
Old 11-20-2011, 02:03 PM
  cherie's Avatar 
cherie cherie is online now
 

X-Wizard
  
Join Date: May 2003
Location: USA
Posts: 1,534
 

Default Re: 404 Page Redirect

You should be able to define the 404 ErrorDocument in .htaccess.
__________________
redlimeweb.com
custom mods and design integration
4.7 linux
Reply With Quote

The following user thanks cherie for this useful post:
TOTVOI (11-22-2011)
  #4  
Old 12-11-2013, 07:46 AM
 
wendy.email wendy.email is offline
 

Advanced Member
  
Join Date: Jun 2005
Location: Canada
Posts: 90
 

Default 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
__________________
Version 4.1.11
Reply With Quote
  #5  
Old 12-12-2013, 02:38 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default 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');
__________________
xcartmods.co.uk
Reply With Quote

The following 3 users thank PhilJ for this useful post:
alinush (11-20-2014), qualiteam (12-12-2013), wendy.email (12-12-2013)
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:11 PM.

   

 
X-Cart forums © 2001-2020