made redirect and alias more general