开发者

.com/ VS .com in external links

When we give link of external sites then how we should give li开发者_JAVA百科nk?

This

http://www.sitename.com/

or this

http://www.sitename.com

Are both same?


Yes. The second will be converted to the first, because it will be sent as:

   GET / HTTP/1.1
   Host: www.sitename.com

The path component is an abs_path, and RFC 2396 says these must begin with a /.


Remember though that while this may be a matter of taste, there are situations where keeping the trailing slash is better practice. See an extensive discussion here:

http://sebastians-pamphlets.com/thou-must-not-steal-the-trailing-slash-from-my-urls/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜