Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to create a custom 404 using store design


Sir Lance

Recommended Posts

Hi

 

I have a basic 404.shtml file which tells the user that content or the page does not exist and provide a link to go to my home page. Its really quite ugly.

 

I would like to create a 404.shtml file which takes is the header, footer, left and right columns and in the centre of the page - tell the user that the content he is looking for is not there for some reason.

 

The 404.shtml file sits above the catalog folder

ie

\404.shtml

\catalog

 

.. and although I have tried to modify the conditions.php by placing additional directory structure in place, I just can't get it working.

 

 

Does anyone know of an addon (I have searched), or somewhere in the forums which show how to create this 404.shtml file utilising the same graphic template as my ecommerce store.

 

SL

Link to comment
Share on other sites

How to Set Up A Custom 404 File Not Found Page

 

If you want one to look like the rest of your site, here's a thought.

 

Pull up one of your shop pages, <right-click> and "View source" and save it as a HTML file. Then using the guidelines provided at the above link modify it to suit your purposes as a 404 page.

 

Albeit a simplistic approach that is probably easier said than done, but it's an idea.

:blush:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

How to Set Up A Custom 404 File Not Found Page

 

If you want one to look like the rest of your site, here's a thought.

 

Pull up one of your shop pages, <right-click> and "View source" and save it as a HTML file. Then using the guidelines provided at the above link modify it to suit your purposes as a 404 page.

 

Albeit a simplistic approach that is probably easier said than done, but it's an idea.

:blush:

 

 

Thanks

 

This is what I did however, but because the 404.shtml file sit one dir above the catalog file it doesn't work. It would be find if the 404 file sat in the catalog dir. I assumed that having a 404.shtml file prior to the catalog file redirect to a \catalog\404.php was not good as the search engine does not like this and also the size fo the 404.shtml file wouldbe so small that IE would shows it own ??

 

Is this the way I should do it. Have a 404.shtml file which redirects to the \catalog\404.php file?

 

SL

Link to comment
Share on other sites

Hi Germ

 

Thanks for your info. I basically did what you said and what I was trying to do. I created a myRC_404.php in my catalog dir, ie \catalog\myRC_404.php

 

I thought I would have to create a 404.shtml in the root directory and then redirect to the \catalog\myRC_404.php file, however I had forgotten about the .htacess which can be writen to peform the redirect.

 

I edited my .htaccess file in my root directory to add the following line

 

ErrorDocument 404 /catalog/myRC_404.php

 

 

And it works like a charm. Hopefully this post will help someone else.

 

SL

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...