Friendly URL Guide Line

URLs should be short, easy to type, hackable (human-editable), and persistent, and they should

visualize site structure

1. Design URLs to describe their content, not the implementation details of your

application. 

Use /Articles/AnnualReport rather than /Website_v2/CachedContentServer/FromCache/AnnualReport.

2. Prefer content titles over ID numbers. 

Use /Articles/AnnualReport rather than /Articles/2392.

3. Do not use file name extensions for HTML pages 

(for example, .aspx or .mvc), but do use them for specialized file types (such as .jpg, .pdf, and .zip).

4.Create a sense of hierarchy 

(for example, /Products/Menswear/Shirts/Red), so your visitor can guess the parent category’s URL.

5.Be case-insensitive (someone might want to type in the URL from a printed page).
The ASP.NET routing system is case-insensitive by default.

6.Avoid symbols, codes, and character sequences. 

If you want a word separator, use a dash (as in /my-great-article). 

Underscores are unfriendly, and URL-encoded spaces are bizarre (/my+great+article) or disgusting (/my%20great%20article).

7.Do not change URLs. 

Broken links equal lost business. When you do change URLs, continue to support the old URL schema for as long as possible via permanent (301) redirections.

8.Be consistent. Adopt one URL format across your entire application

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值