They didn't, really, AFAIK. At Gaugamela the Persians got an entire cavalry squadron through a gap that had appeared in the disjointed phalanx line...

...and that one was on level ground. Heck, the Persians had even smoothed out any major bumps beforehand for their scythed chariots.