Improved nginx redirect config