redirect based on rack env variable