Add redirect_permanent feature for nginx