views:

37

answers:

2

When we give link of external sites then how we should give link?

This

http://www.sitename.com/

or this

http://www.sitename.com

Are both same?

+3  A: 

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 /.

Matthew Flaschen
So is it better to give First?
metal-gear-solid
No, it doesn't matter, since any user agent will do the conversion.
Matthew Flaschen
+1  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/

Kornel Kisielewicz