1

Can URL contain colons to represent a value other than port number. The value can be a mac address of a machine.

Sample URL

http://172.17.48.10/lab/first/C0:4A:00:40:71:0A/wan

Surya
  • 65
  • 9

2 Answers2

0

What you're referring to is an HTTP URL. There are dozens of other URL types out there -- after all, URL stands for nothing more than uniform ressource locator, ie. is an instruction on how to find a specific ressource.

Many URL types share the form of HTTP URLs (eg. FTP, HTTPS etc), which is

{protocol}://{hostname}[:port][/path]

where path can be quite everything, including things with colons; normally you'd see these being URL-encoded (the stuff with % in URLs). Why don't you simply try out; the full syntax is documented in RFC 3986.

Community
  • 1
  • 1
Marcus Müller
  • 34,677
  • 4
  • 53
  • 94
  • @Muller thanks. Yes I referred the rfc 3986. The colon is part of Reserved Characters. My doubt was the colons which are part of "/path" must be percent-encoded or it can allow those. – Surya Feb 20 '15 at 10:11
0

The answer is: yes. And as Marcus said: the specs are out there.

Julian Reschke
  • 40,156
  • 8
  • 95
  • 98