1

I am making own URL generator and there is a problem. I have absolute URL and I need to get relative URL from it.

Relative URL is path and query, like URI, so is this the same?

Greeso
  • 5,502
  • 6
  • 43
  • 65
  • possible duplicate of [What's the difference between a URI and a URL?](http://stackoverflow.com/questions/176264/whats-the-difference-between-a-uri-and-a-url) – unor Sep 01 '14 at 14:42
  • The question is not very clear. Can you please explain it better? Thanks. – Greeso Sep 20 '14 at 01:14

1 Answers1

0

the relative url depends on the context.

absolute is: c:/home/user/test.zip

relative (when context is c:/home) to test.zip is: ./user/test.zip (or user/test.zip)

Ben
  • 2,981
  • 23
  • 43