Yes, it has never been illegal, although such a marriage was voidable under the Marriage Act 1835.
Jane Austin's younger brother Charles married his late wife's sister in the early 19th century.
The Deceased Wife's Sister's Marriage Act of 28 August 1907 made such marriages as valid as any other, and took away the right to void after the marriage.