Sorry if it so basic but I could not find the answer by searching.
If we are in the page http://www.example.com/a-dir-without-trailing-slash
how we can reach the sub-directory http://www.example.com/a-dir-without-trailing-slash/pic
using relative URI? (we do not know the current directory name(i.e. a-dir-without-trailing-slash
)
Some more explanation:
a-dir-without-trailing-slash
is the name of an article in the website. It is not an actual directory nor an actual file name. Now, I want to get the pictures that are used in this article by addresses like:
http://www.example.com/a-dir-without-trailing-slash/pic/1
http://www.example.com/a-dir-without-trailing-slash/pic/2
,...
and in the webpage html, I would refer to them with something similar to:
<img src="pic/1" />
If the original article address was in the form of http://www.example.com/a-dir-with-trailing-slash/
, the above example would work finely. I want to know if is it possible to get a relative URI
with current article addresses (without trailing slash)?
Thank you very much