开发者

.com/ VS .com in external links

开发者 https://www.devze.com 2023-01-01 20:33 出处:网络
When we give link of external sites then how we should give li开发者_JAVA百科nk? This http://www.sitename.com/

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

精彩评论

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