# Redirect hook

**URL:** <https://forum.wixstudio.com/t/redirect-hook/42023>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [March 29, 2018, 2:42pm UTC](https://forum.wixstudio.com/t/redirect-hook/42023 "2018-03-29T14:42:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![scott-typaldos](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/scott-typaldos/32/2620_2.png) [@scott-typaldos](https://forum.wixstudio.com/u/scott-typaldos)\
**Post date:** [March 29, 2018, 2:42pm UTC](https://forum.wixstudio.com/t/redirect-hook/42023/1 "2018-03-29T14:42:10Z")

</div>

I’m trying to create a redirect hook so that when there is a specific value i in the database the link is redirected to another dynamic page.

I have a data field called template.

If the value is 1, I want the page to be directed to a certain page.  
The same would happen for value 2 going to another page  
and value 3 going to yet another page.

I’ve been reading the “wix router” part of your site and tried to start from examples present there but I am not managing to make it work. The part that I find difficult is how to instruct the hook to fetch the data in the template field.
