ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Search Engine Optimization
  New Posts New Posts RSS Feed - Rewrite away PC's sub-directories
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Rewrite away PC's sub-directories

 Post Reply Post Reply Page  <123>
Author
Message
blackey View Drop Down
Newbie
Newbie


Joined: 11-November-2008
Location: Livermore, CA
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote blackey Quote  Post ReplyReply Direct Link To This Post Posted: 08-February-2010 at 2:33pm
RewriteRule ^productcart/pc/(.*)$ $1 [NC,R=301]

The rewrite above is causing the productcart/pc/productcart/pc to be valid.  It could be productcart/pc repeating 1000 times for that matter and the way the above rewrite works it would still be valid.  Google picks up on that and indexes all kinds of connonical pages.  I think the rewrite should include the base url somehow to cause multiples of productcart/pc to go to a 404 page.




Back to Top
Hamish View Drop Down
Admin Group
Admin Group


Joined: 12-October-2006
Location: United Kingdom
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hamish Quote  Post ReplyReply Direct Link To This Post Posted: 08-February-2010 at 2:46pm
Hi Blackey,
     There's an entry on the WIKI for adding a canonical tag to ProductCart.
I understand Google finds pages by following links etc - so I'm unclear how it can find variations on URL's that are not linked to anywhere, so are there links to "productcart/pc/productcart/pc"versions of your pages?
Back to Top
Guests View Drop Down
Guest
Guest
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guests Quote  Post ReplyReply Direct Link To This Post Posted: 08-February-2010 at 2:58pm
Originally posted by blackey blackey wrote:

RewriteRule ^productcart/pc/(.*)$ $1 [NC,R=301]
The rewrite above is causing the productcart/pc/productcart/pc to be valid.  It could be productcart/pc repeating 1000 times for that matter and the way the above rewrite works it would still be valid.  Google picks up on that and indexes all kinds of connonical pages. 
Not exactly. While productcart/pc/productcart/pc/ would still resolve, anything there has been permanetly (301) redirected to the same file in the root. So such "legacy" URLs are not infact "valid", they are 301 redirected. This tells Google "this page has been permantly moved, so drop indexing on the old location and reindex under the new location," essentially.
 
Originally posted by blackey blackey wrote:

I think the rewrite should include the base url somehow to cause multiples of productcart/pc to go to a 404 page.
 
Why throw a 404 when you can 301 redirect?
 
So, I'll try once more: Do you want your store pages to resolve under the web root, or are you looking to correct pages indexed as /productcart/pc/productcart/pc/* back to just /productcart/pc/?
Back to Top
blackey View Drop Down
Newbie
Newbie


Joined: 11-November-2008
Location: Livermore, CA
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote blackey Quote  Post ReplyReply Direct Link To This Post Posted: 08-February-2010 at 3:53pm
Sean,

I have the cannonical link, and Google is still indexing multiple productcart/pc/productcart/pc/ pages (as seen from Smarterstats).  Not sure if they will show up in the serps that way yet, but I've seen them do it before even with 301's.  What Google should do, and what they do are not always the same I've found.

I would prefer that store/pc resolves, but store/pc/store/pc does not.


Back to Top
Guests View Drop Down
Guest
Guest
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guests Quote  Post ReplyReply Direct Link To This Post Posted: 08-February-2010 at 9:31pm
Hi @blackey,
 
If that's the case, this isn't really the regex you should be using for your purpose; your issue is different than what we are trying to address here on this thread.
 
Something like this should work for you, though:

RewriteEngine on
RewriteBase /

# START: redirect double /productcart/pc/ sud-directories back to /productcart/pc/
RewriteRule ^productcart/pc/productcart/pc/(.*)$ /productcart/pc/$1 [NC,R=301,L]
 
If that doesn't work for you, please take up your issue on Helicon's ISAPI_Rewrite forum. Anton over there will get you ironed out. I don't presume to support ISAPI_Rewrite issues in general here on this forum; only the very specifi PC issues I've chosen to address. The issue I'm addressing on this thread is to rewite away the typical PC sub-directory strucuture, not any anomolies you may already have existing on your site as legacy.
Back to Top
intour View Drop Down
Senior Member
Senior Member


Joined: 30-June-2006
Location: United Kingdom
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote intour Quote  Post ReplyReply Direct Link To This Post Posted: 19-March-2010 at 12:39pm
This looks really neat Sean,
 
If it gets rid of the 2 levels productcart displays how does it display the page name?
 
Does is work with the SEO friendly URL's? so for example:
 
mysite.com/productcat/pc/myproduct.htm
 
becomes
 
mysite.com/myproduct.htm
 
Nigel
 
 
Innerview
Productcart Platinum Reseller
Web Design/Hosting/Virtual Tours
Back to Top
blackey View Drop Down
Newbie
Newbie


Joined: 11-November-2008
Location: Livermore, CA
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote blackey Quote  Post ReplyReply Direct Link To This Post Posted: 19-March-2010 at 1:01pm
Here is an example:

http://www.lpiracing.com/

Back to Top
intour View Drop Down
Senior Member
Senior Member


Joined: 30-June-2006
Location: United Kingdom
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote intour Quote  Post ReplyReply Direct Link To This Post Posted: 19-March-2010 at 1:55pm
Thanks Blackey,
 
I like this !
 
Nigel
Innerview
Productcart Platinum Reseller
Web Design/Hosting/Virtual Tours
Back to Top
Guests View Drop Down
Guest
Guest
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guests Quote  Post ReplyReply Direct Link To This Post Posted: 03-April-2010 at 12:09am
I have found one little issue more here with regard to the location of UPS logos. I have edited the original post to account for this.
Back to Top
Guests View Drop Down
Guest
Guest
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guests Quote  Post ReplyReply Direct Link To This Post Posted: 07-April-2010 at 2:47pm
I have found one more little issue more here with regard to the location of CAPTCHA images. I have edited the original post to account for this.
Back to Top
 Post Reply Post Reply Page  <123>
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.