I don't see why it would be illegal. Obviously if you own property in Alabama, it should be legal to register your car there since that would make you a resident, even if you don't live there 24/7.