As long it's the same flight, you will only earn miles based on the original flight, even if it diverts.
However if there are cancellations and rebookings, then one could certainly earn more based on the new flights.
For example, if your ORD-EGE flight diverted to SLC and then cancelled, and you were rebooked SLC-LAX-EGE, you would still earn miles for ORD-EGE, SLC-LAX, & LAX-EGE.