fixed loops on trailing slash mismatch

if $original_permalink is emty we'll have infinite loop from $reques 
to $url equal to $request