I'd recommend target_uri.path, which actually parses the URI and gives you the path.  Example why path() is important:

	1.9.3p392 :002 > x = URI("http://google.com/test.html")
	 => #<URI::HTTP:0x007ffc5b039e90 URL:http://google.com/test.html> 
	1.9.3p392 :003 > x.path
	 => "/test.html"