1

I was doing some tests on my server and I found that adding . or .. at the end of the URL seems to change things, but I don't know why.

It's not limited to my server, though. I can access www.google.fr.. via Firefox or wget (didn't try an other mean, but I guess it's the same).

So, do you guys know what do these extra . mean?

unor
  • 92,415
  • 26
  • 211
  • 360
merours
  • 4,076
  • 7
  • 37
  • 69

1 Answers1

1

There are two type of URL possible.

  1. Absolute= having fully qualified path
  2. Relative= having path relative to current directory.

"." & ".." are used in relative paths.

"." means Current Directory or Current Path Segment

".." means one directory up relative to current Directory/Current Path Segment

Pranav Singh
  • 17,079
  • 30
  • 77
  • 104
  • Concerning your terminology, "directory" seems inappropriate in this context: A URL does not necessarily map to a hierarchical file system. A more appropriate term might be "path segment"; see e.g. [RFC 1808](http://www.ietf.org/rfc/rfc1808.txt). – stakx - no longer contributing Jul 05 '13 at 13:25
  • @stakx ,I agree, updated answer above. But RFC 1808 doesn't states that too. :) – Pranav Singh Jul 05 '13 at 13:32
  • `.` and `..` can also occur in absolute URLs, e.g., `http://www.foo.com/bla/blub` is the same as `http://www.foo.com/bla/../bla/./blub` – tobias_k Jul 05 '13 at 13:36