Thinking About Changing the Category Rewrite Path ..
Posted Oct 02, 2012 - 8:05 AM:
I've noticed for a while now that pages with shorter urls seem to rank better with Google, especially pages that managed to get indexed with really short urls like mydomain.com/9999 instead of the usual category path. With the current default {CATREWRITEPATH}/{PAGE}.html scheme, I've noticed that for example that mydomain.com/coupon-codes/clothing/childrens-apparel/rascals-2-rockstars/ also works at mydomain.com/9999/rascals-2-rockstars/ or just mydomain/rascals-2-rockstars/
So I'm trying to decide what is the best way to shorten down my urls, and 301 redirecting the old ones to the new ones, without fudging everything up, and still keeping them categorized. I'd like to change the cat rewrite to {CATNAME}/{PAGE}.html , but I would have to make sure every category name is unique, which is fine with me. Or I could leave the rewrite path alone, and just use mydomain.com/{CATNAME} on site and let the bots pick it up from there, ammend the sitemap and try to create some 301 redirects that don't break everything.
Any thoughts or anything I should be aware of?
In preparation for a change I've made sure there are no special characters any of my {CATNAME}s and removed any specialurl redirects.
Or I could leave the rewrite path alone, and just use mydomain.com/{CATNAME} on site
That would break on any category with a space in the name.
Testing {CATNAME} for category rewrites and {LINKCATNAME} for listing URLs. I see the vote and email pages break under this changed scheme, I'll fix that in 7.1.1.
Cool... so the change to {CATNAME}/{PAGE}.html should be good? You mentioned {LINKCATNAME} -- are you suggesting that the link rewite path would have to change too?
As far a 301 redirect, which is better - a simple 301 redirect in the final category template, or should I fiddle with the htaccess and try for a complete folder rewrite?
{CATNAME}/{PAGE}.html was what I tested with yes. You don't have to change {LINKREWRITEPATH} to {LINKCATNAME}, but if you want shorter URLs and for it to visually match the categories I assume you'd want to change that.
I'm not sure what you have in mind for an in-template 301 redirect -- maybe you're thinking of the 'bad request' template but I'm not sure it'll arrive there, it may be 404 pages. .htaccess is the only way I can think of that would work. Probably a fairly complex set of rules, I can write it for $30 if needed.
Ok, I could use that for $30 ... I stink at .htaccess and tend to break stuff. I'm attaching my current .htaccess file, removing all those special urls cleaned it up quite a bit.
So when it's time, for every instance of {CATREWRITEPATH} in the SEO page, I'll change it to {CATNAME}, and for every instance of {LINKREWRITEPATH} I'll change it to {LINKCATNAME} correct? And all the old paths will get 301 redirected to the new.
You can send a paypal invoice to my email. Hope it's a smooth move
Comments on Thinking About Changing the Category Rewrite Path ..
Member
Usergroup: Customer
Joined: Nov 12, 2004
Total Topics: 9
Total Comments: 20
Posted Oct 02, 2012 - 8:05 AM:
I've noticed for a while now that pages with shorter urls seem to rank better with Google, especially pages that managed to get indexed with really short urls like mydomain.com/9999 instead of the usual category path. With the current default {CATREWRITEPATH}/{PAGE}.html scheme, I've noticed that for example that mydomain.com/coupon-codes/clothing/childrens-apparel/rascals-2-rockstars/ also works at mydomain.com/9999/rascals-2-rockstars/ or just mydomain/rascals-2-rockstars/
So I'm trying to decide what is the best way to shorten down my urls, and 301 redirecting the old ones to the new ones, without fudging everything up, and still keeping them categorized. I'd like to change the cat rewrite to {CATNAME}/{PAGE}.html , but I would have to make sure every category name is unique, which is fine with me. Or I could leave the rewrite path alone, and just use mydomain.com/{CATNAME} on site and let the bots pick it up from there, ammend the sitemap and try to create some 301 redirects that don't break everything.
Any thoughts or anything I should be aware of?
In preparation for a change I've made sure there are no special characters any of my {CATNAME}s and removed any specialurl redirects.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Or I could leave the rewrite path alone, and just use mydomain.com/{CATNAME} on site
That would break on any category with a space in the name.
Testing {CATNAME} for category rewrites and {LINKCATNAME} for listing URLs. I see the vote and email pages break under this changed scheme, I'll fix that in 7.1.1.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Okay seems to work now in the unreleased 7.1.1.
Member
Usergroup: Customer
Joined: Nov 12, 2004
Total Topics: 9
Total Comments: 20
Cool... so the change to {CATNAME}/{PAGE}.html should be good? You mentioned {LINKCATNAME} -- are you suggesting that the link rewite path would have to change too?
As far a 301 redirect, which is better - a simple 301 redirect in the final category template, or should I fiddle with the htaccess and try for a complete folder rewrite?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
{CATNAME}/{PAGE}.html was what I tested with yes. You don't have to change {LINKREWRITEPATH} to {LINKCATNAME}, but if you want shorter URLs and for it to visually match the categories I assume you'd want to change that.
I'm not sure what you have in mind for an in-template 301 redirect -- maybe you're thinking of the 'bad request' template but I'm not sure it'll arrive there, it may be 404 pages. .htaccess is the only way I can think of that would work. Probably a fairly complex set of rules, I can write it for $30 if needed.
Member
Usergroup: Customer
Joined: Nov 12, 2004
Total Topics: 9
Total Comments: 20
Ok, I could use that for $30 ... I stink at .htaccess and tend to break stuff. I'm attaching my current .htaccess file, removing all those special urls cleaned it up quite a bit.
So when it's time, for every instance of {CATREWRITEPATH} in the SEO page, I'll change it to {CATNAME}, and for every instance of {LINKREWRITEPATH} I'll change it to {LINKCATNAME} correct? And all the old paths will get 301 redirected to the new.
You can send a paypal invoice to my email. Hope it's a smooth move
Attached Files:
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Upgrade to 7.1.1 Beta 2, then enter this in the other .htaccess content box:
This redirects categories, listing details, voting and email pages. Worked for the test URLs I tried.
Member
Usergroup: Customer
Joined: Nov 12, 2004
Total Topics: 9
Total Comments: 20
Hey Paul, nevermind ... this rule I had in there
RewriteRule ^([^/]*)/([^/]*)/([^/]*)\.html$ /suggest.php?rewritten=1&action=$1&filled=1&custom=yes&TID=$2&catid=$3 [L]
is breaking the rule for the link rewrite path 301
I'll just remove it and do without. Sorry! What's your email for paypal?