Both are correct, though the second is preferred stylistically. The general principle is that long, or "heavy" adjuncts should be placed at either the beginning or end of a sentence where possible. This aids comprehension. Shifting of heavy constituents is also useful in the case of relative clauses, which can be quite long. Consider (relative clauses bracketed):
- What man [who can look on her beauty and not feel remorse for the way she was treated] is there?
- What man is there [who can look on her beauty and not feel remorse for the way she was treated]?
Both are "grammatically correct," but most would agree that the "extraposed" relative clause (#2) is to be preferred from a comprehensibility standpoint, because it does not make you wait forever to hear the predicate, even though the relative clause is separated from the noun it modifies (man).