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)
|
|
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)
|
|
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
|
||
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.
|
||
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)
|
|
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/?
|
||
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? |
||
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. |
||
Guests
Guest |
Post Options
Thanks(0)
|
|
So, are you saying that you want to use this to rewrite /store/pc/store/pc/ back to just /store/pc/ and not have the pages re-written back to the web root? |
||
blackey
Newbie Joined: 11-November-2008 Location: Livermore, CA Status: Offline Points: 0 |
Post Options
Thanks(0)
|
|
Yea sorry about that. The real directory is store/pc. Unfortunately, store/pc/store/pc will rewrite to the same page. Google has picked up on Store/pc/store/pc and I've seen some pages being spidered that way.
|
||
Guests
Guest |
Post Options
Thanks(0)
|
|
Hi @blackey,
I'm afraid I don't quite understand you question. Are you saying that you have a directory structure with www.lpiracing.com/racing-parts/pc/ as well as www.lpiracing.com/racing-parts/pc/racing-parts/pc/ -- or that somehow Google indexed things this way?
Had a spin through your site, clicking from pages Google had indexed and everything appear to be all good.
Please explain further what you are up against here.
|
||
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 |