shortening url loop protection regex