Can . (period) be part of the path part of an URL?

后端 未结 4 1366
难免孤独
难免孤独 2020-12-15 03:40

Is the following URL valid?

http://www.example.com/module.php/lib/lib.php

According to http://tools.ietf.org/html/rfc1738 section the hpath element of an UR

4条回答
  •  情话喂你
    2020-12-15 04:27

    I don't see where RFC1738 disallows periods (.) in URLs. Here are some excerpts from there:

    hpath          = hsegment *[ "/" hsegment ]
    hsegment       = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
    uchar          = unreserved | escape
    unreserved     = alpha | digit | safe | extra
    safe           = "$" | "-" | "_" | "." | "+"
    

    So the answer to your question is: Yes, http://www.example.com/module.php/lib/lib.php is a valid URL.

提交回复
热议问题