开发者

Url mapping in ASP.NET MVC

开发者 https://www.devze.com 2023-03-06 10:50 出处:网络
I\'m working on a new blog website created using ASP.NET MVC. I\'m wondering what is the best way to map an url to a post. Currently I implemented in such a way an user can browse to a post by two way

I'm working on a new blog website created using ASP.NET MVC. I'm wondering what is the best way to map an url to a post. Currently I implemented in such a way an user can browse to a post by two ways through categor开发者_如何学Pythony or archive:

  1. http://myblog.com/JavaScript/encapsulation_in_js (/PostCategory/Post)
  2. http://myblog.com/archive/2010/12/encapsulation_in_js (/Archive/Year/Month/Post)

Is there any problem on doing so?


The trouble with this is that there is not 1 finite URL for a post - this will provide search engine ranking dilution. The ranking for the post will be split across 2 different links

The way you could handle this is that you could have a 301 redirect from 1 to 2 or from 2 to 1 and when a user hits either of the link then they will be taken to the finite URL

0

精彩评论

暂无评论...
验证码 换一张
取 消