Added configuration for redirects and implement redirect functionality