Is the following URL valid?
http://www.example.com/module.php/lib/lib.php
According to https://www.rfc-editor.org/rfc/rfc1738 section the hpath element of an URL can not contain a '.' (period). There is in the above case a '.' after "module" which is not allowed according to RFC1738.
Am I reading the RFC wrong or is this RFC succeed by another RFC? Some other RFC's allows '.' in URLs (https://www.rfc-editor.org/rfc/rfc1808).
So it's basically A – Z , a – z , 0 – 9 , - , . , _ , ~ , ! , $ , & , ' , ( , ) , * , + , , , ; , = , : , @ , as well as % that must be followed by two hexadecimal digits. Any other character/byte needs to be encoded using the percent-encoding.
For whoever is also looking into the spec: At the end you can see that path can contain segment and segment can contain xpalpha which can contain xaplha which can contain "safe" which can contain a dot.
It doesn't mean anything. You could have an URI like http://example.com/all.those.periods. – PeeHaa.
A URL (Uniform Resource Locator) identifies a resource on a remote server and gives the network location on that server. The URL path is the string of information that comes after the top level domain name. You can use the HTTP-proxy to block websites that contain specified text in the URL path.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With