I'm parsing HTML files and parsing out the links. Sometimes it comes accross something like:
./dir/dir/lol.html
My question is how do I turn this into an absolute url, the parser knows the URL that if found the link on.
For example:
parses: http://www.website.com/lol/index.html
find: ./dir/dir/haha.html
Then how can I combine this into:
http://www.website.com/lol/dir/dir/haha.html