SEO Friendly URL Rewriter Parameters
I would appreciate you advice on how to incorporate parameters into SEO Friendly URLs
We have decided to have the "techie" parameters first, followed by the "SEO Slug"
\product\ABC123\fly-your-own-helicopter
much like S.O. - if the SEO Slug changes, or is truncated, or missing, we still have the Product and ABC123 parameters; various articles say that having such extra data doesn't harm SEO ranking.
We need to have additional parameters; we could use "-" to separate parameters as it makes them look similar to the SEO Slug, or we could/should use something else?
\product\ABC123-BOYTOY-2\boys\toys\fly-your-own-helicopter
This is 开发者_JAVA百科product=ABC123
, in Category=BOYTOY
and Page=2
.
We also want to keep the hierarchy as flat as possible, and thus I think:
\product-ABC123-BOYTOY-2\boys\toys\fly-your-own-helicopter
would be better - one level less.
We have a number of "zones", e.g.
\product-ABC123\seo-slug-for-product
\category-BOYTOY\seo-slug-for-category
\article-54321\terms-and-conditions
it would help us a lot if we could just user our 5 digit Page ID number instead, so these would become
\12345-ABC123\seo-slug-for-product
\23456-BOYTOY\seo-slug-for-category
\54321\terms-and-conditions
(Products & Categories have a number of different Page IDs for different templates, this style would take us straight to the right one)
I would appreciate your insight into what parameter separators to use, and if the leading techi-data is going work well for us.
In case relevant:
Classic ASP application on IIS7 + MSSQL2008 Product & Category codes contain A-Z, 0-9, "_" only.
Personally, I don't think any of the following:
\12345-ABC123\seo-slug-for-product
\product-ABC123-BOYTOY-2\boys\toys\fly-your-own-helicopter
are particular "friendly". They may be "ok" for SEO, but you might lose your friendly part in the coding you have at the beginning of the url.
Why can't you have something like this:
\product\seo-slug-for-product
And then have a table or dictionary which maps the slug to the product ID. That way when your MVC controller receives the slug as a parameter it can look up all the other values.
Worst case, I would do it the SO way. Which is more like:
\product\123456\seo-slug-for-product
The number is the product ID. I think they do it so that the titles to the articles can change and the old URLs still work. That's why:
SEO Friendly URL Rewriter Parameters
and
SEO Friendly URL Rewriter Parameters
work. They use:
<link rel="canonical"
href="https://stackoverflow.com/questions/3023298/seo-friendly-url-rewriter-parameters">
to ensure that google indexes only one page.
精彩评论