| CASE 1 Given 'http://a.b.c.d/dir1/dir2/x.html', what we want is
http://a.b.c.d/dir1/dir2/That is, get rid of the last part: | ||||
Script and Comments
| ||||
| CASE 2 Given 'http://a.b.c.d/dir1/dir2/x.html', what we want is
http://a.b.c.d/That is, keep only the host+domain part. | ||||
Script and Comments
| ||||