Always remove last base segment when calculating relative urls.