Przemysław Suszek Posted March 9, 2022 Share Posted March 9, 2022 Hi, I have to create redirect from category which doesn't exist to the new one. The problem is when I try by using htaccess I always see 404 from Prestashop controler. How to create redirect by using Prestashop classes or controllers? Kind regards Link to comment Share on other sites More sharing options...
Ress Posted March 9, 2022 Share Posted March 9, 2022 If you have Prestashop 1.7.7, you can use the "actionFrontControllerInitBefore" hook. If you have an earlier version, you can do these checks, in the init() method, from the FrontController class. You can check the request in the variable $ _SERVER ['REQUEST_URI'], and depending on it, do the redirect. You can use the redirect() method from the Tools class. 1 Link to comment Share on other sites More sharing options...
Przemysław Suszek Posted March 10, 2022 Author Share Posted March 10, 2022 Thanks You for your answer. 1 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