Working redirects based on group