Quite easy to do, just enter:

about:config

and set the value

network.http.redirection-limit=0