In a question form, only one word (from the statement form) can be
moved to a position before the subject. This is almost always a
verb, but it may be a verb with a contracted negative "n't"
attached. When spelled out as "not", "not" counts as a second
word and is not placed before the subject.
First alternative:
It hasn't been raining for very long.
"It" is the subject.
Question form: Hasn't it been raining for very long?
Second alternative:
It has not been raining for very long.
"It" is the subject.
Question form: Has it not been raining for very long?
"Has not it" puts two words -- a verb and the negation "not" -- in
front of the subject. This form is not used in modern English.
The first alternative shown above is the most common.
CJ