Zen Cart Logo
Forums / General Questions / 404 redirects

404 redirects

Views: 1,114

Results 1 to 11 of 11
19 Sep 2014, 10:07 PM
#1
andy_c27 avatar

andy_c27

Zen Follower

Join Date:
Oct 2010
Location:
United Kingdom
Posts:
477
Plugin Contributions:
0

404 redirects

Hey guys wondering if anyone can help

How does 1 go about setting up 404 redirects for products that have been deleted from my site ,I've seen some that were deleted about 3/4 years ago still appearing , as I am having a major problem with these on google atm and am going round in circles by not fixing these correctly
using the latest version of zencart.
I believe there is a way to do it htaccess or any over way will be fine too

thanks

20 Sep 2014, 10:21 AM
#2
andy_c27 avatar

andy_c27

Zen Follower

Join Date:
Oct 2010
Location:
United Kingdom
Posts:
477
Plugin Contributions:
0

Re: 404 redirects

I have been looking though my 404 in my error_docs file and it seems all wrong ...could someone advise as to what should be in there

20 Sep 2014, 12:50 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,081
Plugin Contributions:
56

Re: 404 redirects

Do you have an example of an "old" link and the "new" link to which it should be mapped?

20 Sep 2014, 6:26 PM
#4
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,777
Plugin Contributions:
11

Re: 404 redirects

Here's an example of a simple 404.shtml that you can add to the root. It presents the logo on the page to confer branding, shows a possible link (if found), and allows the customer to search the site. You can add a special stylesheet but it is not needed.
Items in red will need to reflect your site.> <link rel="stylesheet" type="text/css" href="includes/templates/yourTemplate/css/stylesheet.css" />

<img src="/includes/templates/newENL/images/logo.gif" alt="yourSite.Com" border="0"> <h3>We're sorry. The information you are looking for may have changed.<br />We've recently revamped our site to better serve our customers.</h3> <h4>Hopefully the system has suggested a link for you to follow.<br />If not, please use the search block to search our site for your item(s).</h4> <style type="text/css"> #goog-wm { } #goog-wm h3.closest-match { } #goog-wm h3.closest-match a { } #goog-wm h3.other-things { } #goog-wm ul li { } #goog-wm li.search-goog { display: block; } </style> <script type="text/javascript"> var GOOG_FIXURL_LANG = 'en'; var GOOG_FIXURL_SITE = 'http://yourSite.com/'; </script> <script type="text/javascript" src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
20 Sep 2014, 6:52 PM
#5
andy_c27 avatar

andy_c27

Zen Follower

Join Date:
Oct 2010
Location:
United Kingdom
Posts:
477
Plugin Contributions:
0

Re: 404 redirects

Hi this 1 has appeared that has been moved not to long ago
http://www. pewterworld.co. uk/Flutes to
http://www. pewterworld.co. uk/GobletsFlutes
but this 1 for example was removed about 2 years ago
http://www.pewterworld. co. uk/TieClips/PackOfCardsTieClip

hi dbltoe
will that coding stop google from finding 404's all the time in web masters tools.
I'll give it a go and see if it helps though

20 Sep 2014, 7:04 PM
#6
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,777
Plugin Contributions:
11

Re: 404 redirects

As far as I know, using the 404 redirect stops the error count. At least Google sees that you're trying to help the customer.

20 Sep 2014, 10:55 PM
#7
andy_c27 avatar

andy_c27

Zen Follower

Join Date:
Oct 2010
Location:
United Kingdom
Posts:
477
Plugin Contributions:
0

Re: 404 redirects

OK think I have done it right ,although if I click on a dead link it still goes to the "Page Not Found" page
is that right

20 Sep 2014, 11:24 PM
#8
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,777
Plugin Contributions:
11

Re: 404 redirects

:blush: Left out...

Add a line to the .htaccess file in the root.> ErrorDocument 404 /404.shtml

21 Sep 2014, 8:41 AM
#9
andy_c27 avatar

andy_c27

Zen Follower

Join Date:
Oct 2010
Location:
United Kingdom
Posts:
477
Plugin Contributions:
0

Re: 404 redirects

thanks for helping ,,still going to page not found ... Is it like a redirect to the main page ,or does it just fool google ..
Just cleared 15 found links this morning again

22 Sep 2014, 9:12 AM
#10
andy_c27 avatar

andy_c27

Zen Follower

Join Date:
Oct 2010
Location:
United Kingdom
Posts:
477
Plugin Contributions:
0

Re: 404 redirects

Checked again this morning and have 6 more ,although it is only on the www. , It seems my redirect from non www. to www. is working now

23 Sep 2014, 6:50 AM
#11
andy_c27 avatar

andy_c27

Zen Follower

Join Date:
Oct 2010
Location:
United Kingdom
Posts:
477
Plugin Contributions:
0

Re: 404 redirects

I have managed to find out how to remove old links ,now begins teh task of removing them 1 by 1