Streaming live at 10am (PST)

Ability to use a 301 redirect from existing page to another page on same site


#1

Hi folks, here is a wish list item from one of our customers, and I thought I would add it to the list :slightly_smiling:

The idea, is to allow a redirect using a 301 redirect from an existing page in a Webflow site, to another existing page in the same Webflow site.

Cheers!


#2

Paste this in Site Settings > Custom Code > Header Code if you want to redirect all pages to exactly the same page slug in another site.

Paste this in Page Settings > Custom Code > Header Code if you only want to redirect a single page.

Note that the page must first exist on both sites.

Change the variable newSite to the new site.

<script>
var newSite = "http://newsite.webflow.io";
window.location = newSite + '/' + location.pathname;
</script>

#3

@samliew, cool code :slightly_smiling: Will come in handy :slightly_smiling: I updated the wish list title and description as I do not think I was clear, the wish list is to update the 301 built-in redirect to allow redirects from existing pages to pages on same site.


#4