## functions – redirecting a URL if accessed directly

Question

I have created a WordPress site, in which I have created a form using wpforms the url of this form is www.xyz.com/form

hierarchy to this URL is

now currently the url is directly accessible, like anyone can visit open www.zyx.com/download/download-with-kyc/verifyOTP/form

All I want is if someone opens it directly, then they get redirected to verifyOTP page first once then they move towards filling the form.

and I also want to set a time for a user who is filling the form
for this right now I am using

Redirection Code:

// redirect for OTP
window.setTimeout(function() {
window.location.href="#verifyOTP page";
}, 30000);


Code placed in advance section of elementor (Custom JS)

0
1 month 2021-12-15T07:46:53-05:00 0 Answers 0 views 0