Albatrosss Posted January 7, 2021 Share Posted January 7, 2021 Hello there. I want to redirect those who enter the site from one country to another site. I have a module that overrides the Address class. But this class only works on the home page. When I enter the home page, I can navigate successfully. But there is no redirection when entering other pages. How can I solve this problem? Thank you. My code at address.php: if($countrycode==12) { header("Location: https://www.example.com"); exit(); } Here I have a $countrycode variable. This code works only on the home page. How can I call this class on other pages? Link to comment Share on other sites More sharing options...
Prestachamps Posted January 8, 2021 Share Posted January 8, 2021 Hi, You can try Address :: functionName () if the class is public and can be used on other pages. Regards, Leo Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now