I am trying to take a url, say http://www.foo.com/foo/index.htm and remove the index.htm portion. This would have to be also able to remove index.htm from http://www.foo.com/foo/foo2/index.htm, in other words, truncate to the last /. Any ideas?
Thanks