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

Custom 404 Error Search Page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 07-31-2004, 09:04 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

http://www.adpmods.com/dogbyteman.html

NOPE. I just made a pretty 404 error page. This would have been a cool mod, but I have moved way beyond it.
Reply With Quote
  #12  
Old 07-31-2004, 09:12 PM
  DogByteMan's Avatar 
DogByteMan DogByteMan is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 833
 

Default

I can make it work somewhat redirecting with .htaccess containing /xcart/customer/search404.php but the page shows without pictures and formatting. If I use http://yourdomain.com/xcart/customer/search404.php as the redirect the formatting is good but the search is bad.
__________________
Dedicated Server provided by EWD Hosting
X-Cart version 4.1.12
PHP 5.3.2
MySQL server 5.0.87-community
Operation system Linux
Perl 5.008008
dogbytecomputer.com
Reply With Quote
  #13  
Old 08-01-2004, 03:15 PM
  DogByteMan's Avatar 
DogByteMan DogByteMan is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 833
 

Default

I've been trying to understand why if you use the following placed in a .htaccess file, the resulting page is without pictures, template formatting and CSS.

ErrorDocument 404 /xcart/customer/search404.php

However if you use...

ErrorDocument 404 http://www.yourdomain.com/xcart/customer/search404.php

Everything shows perfectly.

WHY?
__________________
Dedicated Server provided by EWD Hosting
X-Cart version 4.1.12
PHP 5.3.2
MySQL server 5.0.87-community
Operation system Linux
Perl 5.008008
dogbytecomputer.com
Reply With Quote
  #14  
Old 08-03-2004, 02:31 PM
  DogByteMan's Avatar 
DogByteMan DogByteMan is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 833
 

Default

If I could just get an answer to the above post, I might be able to make this script work...
__________________
Dedicated Server provided by EWD Hosting
X-Cart version 4.1.12
PHP 5.3.2
MySQL server 5.0.87-community
Operation system Linux
Perl 5.008008
dogbytecomputer.com
Reply With Quote
  #15  
Old 08-03-2004, 02:38 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

Wish I could help buddy, but this is out of my league.
Reply With Quote
  #16  
Old 08-04-2004, 01:53 PM
  DogByteMan's Avatar 
DogByteMan DogByteMan is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 833
 

Default

I'm Sooooooo Close..... Yet Soooooooo Far
__________________
Dedicated Server provided by EWD Hosting
X-Cart version 4.1.12
PHP 5.3.2
MySQL server 5.0.87-community
Operation system Linux
Perl 5.008008
dogbytecomputer.com
Reply With Quote
  #17  
Old 09-08-2004, 09:56 AM
 
TonyD TonyD is offline
 

eXpert
  
Join Date: Mar 2004
Location: Okc
Posts: 288
 

Default

i know i am Waaaay late on this...but i got it to work by simply going into my control panel and adding a shtml redirect...

so that anytime someone goes to a page that doesnt exist, they get redirected to this new search404 and it seems to do the trick for me....
if you want to use this you will need to adjust the name/location of your search404.php file....

Code:
<HTML> <head> <meta HTTP-EQUIV="Refresh" CONTENT="1; URL=search404.php"> </head> </HTML> <!-- -->

~TonyD
__________________
X-Cart v 4.7.8(live)
Reply With Quote
  #18  
Old 11-21-2004, 12:09 PM
  DogByteMan's Avatar 
DogByteMan DogByteMan is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 833
 

Default

Anybody ever upgraded this code to work with 4.0.x?
__________________
Dedicated Server provided by EWD Hosting
X-Cart version 4.1.12
PHP 5.3.2
MySQL server 5.0.87-community
Operation system Linux
Perl 5.008008
dogbytecomputer.com
Reply With Quote
  #19  
Old 01-05-2005, 06:57 PM
 
markwhoo markwhoo is offline
 

X-Adept
  
Join Date: Nov 2003
Posts: 799
 

Default

I am not sure if this will help you guys out or not.

I have done this on several sites and it seems to help. This helps to not loose to many customers and keeps them in the store.

I recieved this from a friend of mine and not sure where it came from, but I know I can't take the credit for making it. Just sharing it. Hope no one minds a sizable post cause it is a bit lengthy. here goes enjoy...

Code:
Error messages have numerous causes, such as misspellings, outdated links or internal server errors. When an error is encountered, your server will display specific generic error pages according to the error. These error pages are not only dead ends, but they are also very frustrating for your potential visitors. When your visitors mistype your web address or click on an outdated link and receive the dreaded error page, they'll most-likely click on their back button and never return. However, you can recover a majority of your lost visitors simply by taking the time to create some customized, user friendly error pages. As servers run different types of software and do not function in the same manner, there isn't a simple method for creating custom error pages that will work with every system. However, if you have your own domain and your site is hosted on a Unix/Linux server running Apache, this article will assist you in creating custom error pages. If you're not sure what type of server you're on, visit the following web address to find out: http://uptime.netcraft.com/up/graph/ Before we begin, keep in mind, editing your server files is serious business. Even one small typographical error can wreak havoc -- make sure you make a backup copy of any file you're planning to edit. Guidelines for creating your error pages: 1. Create your error pages in standard HTML -- just as you would create any other web page for your site. 2. Don't alarm your visitors. Never include the word "ERROR" in large, bold text. Your visitors may immediately become alarmed and think they've done something to cause the error. Instead, be apologetic and encourage your visitors to click on the navigational links to locate additional resources and information. 3. Your error pages should look just like the rest of your web pages. Each error page should contain good navigational links, a search feature, and provide information in regard to the specific error they received. Once you've created an error page, save it as the error name. For example, if you're creating a customized error page for a 400 Bad Request error, your page should be saved as 400.html. Here are some of the more common errors: 400 Bad Request 401 Authorization Required 403 Forbidden 404 File Not Found 405 Method Not Allowed 500 Internal Server Error 501 Method Not Implemented 502 Bad Gateway 503 Service Temporarily Unavailable Once you've created your pages, you'll need to access your server via FTP and create a new folder called "errordocs" where you store your HTML files. Upload your new error documents into your new folder. Your next step will be to locate your .htaccess file and download it to your computer. (If you use FrontPage to publish your web pages, you cannot customize the .htaccess file, as FrontPage uses the .htaccess file. Editing the file may cause errors in your configuration.) The .htaccess file should be located on your server where you store your HTML files. If the .htaccess file isn't visible, you can create one within a plain text editor. However, you must first make sure your server isn't configured to hide the file. Your FTP program should enable you to choose to display hidden files and folders on your server. Once you've downloaded your .htaccess file, open it within a plain text editor, such as Note Pad, and add the following lines below any other text that may be present: ErrorDocument 400 /errordocs/400.html ErrorDocument 401 /errordocs/401.html ErrorDocument 403 /errordocs/403.html ErrorDocument 404 /errordocs/404.html ErrorDocument 405 /errordocs/405.html ErrorDocument 500 /errordocs/500.html ErrorDocument 501 /errordocs/501.html ErrorDocument 502 /errordocs/502.html ErrorDocument 503 /errordocs/503.html If you're creating your own .htaccess file, open a plain text editor and add the above lines. When typing in the information, make certain you type it exactly as it appears above. You can include the error documents of your choice. Once the file is complete, save it as .htaccess and upload it to your server, via FTP in ASCII mode, where you store your HTML files. If you have a Windows operating system, you will be unable to save the file as .htaccess. You'll need to save it as htaccess.txt. Once you upload the file to your server, you can rename it to .htaccess. That's all there is to it. When your visitors click on an outdated link, your custom error page will now be displayed. Creating your own custom error pages is well worth the time and effort, as they will enable you to recover an unlimited number of your visitors. If you follow this step by step guide, you can have your pages up and running in no time.

Well, there ya go. I am sure a lot of you already knew this, but for those who may not, now you do.
__________________
vs 4.1.12
Reply With Quote
  #20  
Old 01-24-2005, 04:13 PM
 
markwhoo markwhoo is offline
 

X-Adept
  
Join Date: Nov 2003
Posts: 799
 

Default

I know this is an old post, but I thoght I would add a tptal list of error pages for those that wish to use this capability in the .htaccess referral I posted above.
  • Client Error 4xx ... 10.4
    400 Bad Request ... 10.4.1
    401 Unauthorized ... 10.4.2
    402 Payment Required ... 10.4.3
    403 Forbidden ... 10.4.4
    404 Not Found ... 10.4.5
    405 Method Not Allowed ... 10.4.6
    406 Not Acceptable ... 10.4.7
    407 Proxy Authentication Required ... 10.4.8
    408 Request Timeout ... 10.4.9
    409 Conflict ... 10.4.10
    410 Gone ... 10.4.11
    411 Length Required ... 10.4.12
    412 Precondition Failed ... 10.4.13
    413 Request Entity Too Large ... 10.4.14
    414 Request-URI Too Long ... 10.4.15
    415 Unsupported Media Type ... 10.4.16
    416 Requested Range Not Satisfiable ... 10.4.17
    417 Expectation Failed ... 10.4.18
    Server Error 5xx ... 10.5
    500 Internal Server Error ... 10.5.1
    501 Not Implemented ... 10.5.2
    502 Bad Gateway ... 10.5.3
    503 Service Unavailable ... 10.5.4
    504 Gateway Timeout ... 10.5.5
    505 HTTP Version Not Supported ... 10.5.6
__________________
vs 4.1.12
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 04:47 PM.

   

 
X-Cart forums © 2001-2020