SEO友好的URL重写器参数 [英] SEO Friendly URL Rewriter Parameters
问题描述
非常感谢您提供有关如何将参数合并到SEO友好URL中的建议
I would appreciate you advice on how to incorporate parameters into SEO Friendly URLs
我们决定首先使用"techie"参数,然后再使用"SEO Slug"
We have decided to have the "techie" parameters first, followed by the "SEO Slug"
\product\ABC123\fly-your-own-helicopter
很像S.O. -如果SEO Slug发生更改,被截断或丢失,我们仍然具有Product和ABC123参数;各种文章说拥有这样的额外数据不会损害SEO排名.
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.
我们需要其他参数;我们可以使用-"分隔参数,因为它使它们看起来与SEO Slug相似,或者我们可以/应该使用其他东西?
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
这是product = ABC123
,在Category = BOYTOY
和Page = 2
中.
This is 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
会更好-少一个级别.
我们有许多区域",例如
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
\product-ABC123\seo-slug-for-product
\category-BOYTOY\seo-slug-for-category
\article-54321\terms-and-conditions
如果我们仅使用5位数的页面ID号,将会对我们有很大帮助,因此这些将成为
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
\12345-ABC123\seo-slug-for-product
\23456-BOYTOY\seo-slug-for-category
\54321\terms-and-conditions
(产品和类别针对不同的模板具有许多不同的页面ID,这种样式会将我们直接带到右边)
(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.
有关情况:
IIS7 + MSSQL2008上的经典ASP应用程序 产品与类别代码仅包含A-Z,0-9,"_".
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
是特别的友好".对于SEO,它们可能是好的",但您可能会在网址开头的编码中失去友好的一面.
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
然后有一个表格或字典,该表格或字典将弹头映射到产品ID.这样,当您的MVC控制器接收到该段塞作为参数时,它可以查找所有其他值.
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
数字是产品ID.我认为他们这样做是为了使文章的标题可以更改,并且旧的URL仍然有效.这就是为什么:
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:
和
工作.他们使用:
<link rel="canonical"
href="https://stackoverflow.com/questions/3023298/seo-friendly-url-rewriter-parameters">
确保Google只索引一页.
to ensure that google indexes only one page.
这篇关于SEO友好的URL重写器参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!