Lindor Posted June 2, 2022 Share Posted June 2, 2022 Hi I need to delete an old page and I need to make a redirect 301 to a External page in diferent domain. It is possible to make it in cloud IPS? I need to make: redirect 301 /test/ https://newdomain.com/test Thanks a lot! Link to comment Share on other sites More sharing options...
Sonya* Posted June 2, 2022 Share Posted June 2, 2022 (edited) If you have Pages, delete the page, create another one with the same slug. Manual HTML, no suite wrapper, no page wrapper and add in into the content: {{\IPS\Output::i()->redirect( [YOUR_EXTERNAL_URL], NULL, 301);}} This would redirect to the external URL with 301 HTTP code. Adjust the code as you need. Edited June 2, 2022 by Sonya* David N., Lindor and SeNioR- 3 Link to comment Share on other sites More sharing options...
Lindor Posted June 2, 2022 Author Share Posted June 2, 2022 Thanks @Sonya* for your quickly answer. I'm testing and IPS returns error. I change YOUR_EXTERNAL_URL to my URL Any idea that whats happend? Link to comment Share on other sites More sharing options...
Solution Sonya* Posted June 2, 2022 Solution Share Posted June 2, 2022 put the URL in quotes: {{\IPS\Output::i()->redirect( 'https://external.url', NULL, 301);}} David N., SeNioR- and Marc Stridgen 3 Link to comment Share on other sites More sharing options...
Lindor Posted June 2, 2022 Author Share Posted June 2, 2022 Thanks a lot @Sonya*, now runs perfectly! Sonya* 1 Link to comment Share on other sites More sharing options...
Recommended Posts