Lindor Posted June 2, 2022 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!
Sonya* Posted June 2, 2022 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., SeNioR- and Lindor 3
Lindor Posted June 2, 2022 Author 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?
Solution Sonya* Posted June 2, 2022 Solution Posted June 2, 2022 put the URL in quotes: {{\IPS\Output::i()->redirect( 'https://external.url', NULL, 301);}} Marc, David N. and SeNioR- 3
Lindor Posted June 2, 2022 Author Posted June 2, 2022 Thanks a lot @Sonya*, now runs perfectly! Sonya* 1
Recommended Posts