Custom Plugin fail to redirect
-
Hello,
We have custom plugin which redirects VPN ips to some custom url. Example if our domain is example.com and some user open https://www.example.com he should remain on this url. But if user with ip xxx.xxx.xxx.xxx types https://www.example.com then user should be redirected to https://www.example.com/?vpn=1.
We have plugin which manages redirects and it is working fine. But if we activete LSCWP then redirects do not works.
Can we in our custom plugin write code that will execute even if page is cached with LSCWP ?
Our custom plugin has add_action(‘wp’, ‘our_function_name’), and function our_function_name reads user IP, then checks is this IP in mysql database table with defined IPS, and if it is in this table then we redirect to {current_url} + “?|&” + “vpn=1”
Thank you and best regards,
Ivan
The topic ‘Custom Plugin fail to redirect’ is closed to new replies.