Skip to main content
Solved

Force URL redirect of a custom page

  • September 30, 2024
  • 2 replies
  • 41 views

  • Contributor ⭐️⭐️⭐️⭐️

Hey there, quick question about redirecting a custom page URL.

 

We created a custom page a while back that’s not so relevant anymore. We’ve included a hyperlink to the custom page in some external materials including downloadable pdfs. Now we’d like the link to go to a newly created landing page.

 

Is there any way to force a redirect of a custom page’s URL to a different URL?

Many thanks for any ideas!

Best answer by DannyPancratz

Yep. You can do that pretty easily by inserting a third party script in the <Head> section. 

<script>
if (window.location.href == 'old URL') {
window.location.replace('new URL');
}
</script>

 

2 replies

DannyPancratz
Forum|alt.badge.img+9
  • VIP ⭐️⭐️⭐️⭐️⭐️
  • Answer
  • September 30, 2024

Yep. You can do that pretty easily by inserting a third party script in the <Head> section. 

<script>
if (window.location.href == 'old URL') {
window.location.replace('new URL');
}
</script>

 


  • Author
  • Contributor ⭐️⭐️⭐️⭐️
  • September 30, 2024

Amazing, thank you @DannyPancratz 😎