If we have any custom fields with fixed values, we can leverage those values to create a redirect switch using JavaScript. Let's see how this small bit of code works.