Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!


Sponsored Content

 

 
 

Photo
- - - - -

Shopping Cart Redirect


  • Please log in to reply
1 reply to this topic

#1 Pixx

Pixx

    HR 1

  • Members
  • Pip
  • 1 posts

Posted 19 March 2005 - 06:45 AM

Split from the pinned thread. Chris

Hi everyone,

Just read through this thread and have a question smile.gif

Most of what's been said has been about permanent redirects - one domain to another, or 'www.domain.com' to 'domain.com.

But what is the best to use when you want to redirect to another directory on the same domain?

We have a shopping cart which is one level down from root for ease of synching uploads - eg. www.mydomain.com/catalog/index.php - and we've been using a 302 in the form of a directoryindex in the htaccess for the last year, and lately we're trying the php 'location' method.

The shop's been getting indexed by Google for the last 3 months but I notice in CPanel awstats is showing a lot of 302 redirects.

1. Would it be better to put a 301 redirect in the htaccess or to leave it as it is with a 302?

I read (somewhere else) that 301's are only for external (other site) redirects, but I'm concerned after reading through this thread that we might get dumped by Google sometime in the future for having 302's.

2. Also, We have another site that has just changed cart types (osCommerce to Zen cart - but the domain is the same) and the new cart type has a different URL structure, so all the existing links displayed on Google for the old cart are not going to bring the customer to the correct page, but rather generate a 404 - page not found error.

We've put a custom 404 page with a meta refresh (probably a 302 - not sure) redirect to take them to the main page (which works fine) but Google still hasn't got the new site completely indexed after a month and we're wondering if we should change that to a 301 also.

Any comments you guys have would be really helpful, since we don't really know much about this stuff biggrin.gif

Thanks

Edited by chrishirst, 19 March 2005 - 07:19 AM.


#2 chrishirst

chrishirst

    A not so moderate moderator.

  • Moderator
  • 5,879 posts
  • Location:Blackpool UK

Posted 19 March 2005 - 07:51 AM

welcome to the forum Pixx hi.gif

On the cart folder. If the shopping cart is going to stay there for the forseeable future then use a 301 to ensure no future problems with the search engines. But having said that, it's isn't a problem where the cart is a folder down providing there are links to the products/categories pages from the home page. It gives a chance for a pre-amble when visitors arrive from directory and external links rather than dropping them straight into the catalogue pages.

The same is true of the 404, rather than a meta refresh or a 302 redirect which can keep the old URIs hanging around in the index for some condsiderable time, You can set up the 404 page so it has all the navigation for the site so visitors and SEs have the new structure to see and a message to tell visitors that the page has moved. MAKE SURE THAT THIS RETURNS A 404 status after the content has been delivered, as scripted 404 pages can return a 200 response which will keep the error URLs in the index.
Also it would be useful to have a script that read the original URL and 301 redirected it to the new location. This could easily be be part of the 404 page using a PHPscript.
In case you aren't aware the original requested url is sent as a querystring to the 404 handler so is easily retrieved and parsed.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users