Rewrite away PC's sub-directories |
Post Reply | Page <123> |
Author | ||
blackey
Newbie Joined: 11-November-2008 Location: Livermore, CA Status: Offline Points: 0 |
Post Options
Thanks(0)
|
|
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. |
||
Hamish
Admin Group Joined: 12-October-2006 Location: United Kingdom Status: Offline Points: 56 |
Post Options
Thanks(0)
|
|
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? |
||
Guests
Guest |
Post Options
Thanks(0)
|
|
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/?
|
||
blackey
Newbie Joined: 11-November-2008 Location: Livermore, CA Status: Offline Points: 0 |
Post Options
Thanks(0)
|
|
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. |
||
Guests
Guest |
Post Options
Thanks(0)
|
|
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:
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.
|
||
intour
Senior Member Joined: 30-June-2006 Location: United Kingdom Status: Offline Points: 0 |
Post Options
Thanks(0)
|
|
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
|
||
blackey
Newbie Joined: 11-November-2008 Location: Livermore, CA Status: Offline Points: 0 |
Post Options
Thanks(0)
|
|
Here is an example:
http://www.lpiracing.com/ |
||
intour
Senior Member Joined: 30-June-2006 Location: United Kingdom Status: Offline Points: 0 |
Post Options
Thanks(0)
|
|
Thanks Blackey,
I like this !
Nigel
|
||
Guests
Guest |
Post Options
Thanks(0)
|
|
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.
|
||
Guests
Guest |
Post Options
Thanks(0)
|
|
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.
|
||
Post Reply | Page <123> |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |