when I spide a website ,I got a lot of bad url like these. http://example.com/../../.././././1.htm http://example.com/test/../test/.././././1.htm http://example.com/.//1.htm http://example.com/../test/..//1.htm
all of these should be http://example.com/1.htm. how to use PHP codes to do this ,thanks.
PS: I use http://snoopy.sourceforge.net/ I get a lot of repeated link in my database , the 'http://example.com/../test/..//1.htm' should be 'http://example.com/1.htm' .
/.\./and//both become/? They are semantically different.