Webflow 301 redirects bulk import
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var hostingContainer = document.getElementsByClassName('hosting-tab')[0]; | |
var hostingController = angular.element(hostingContainer); | |
var scope = hostingController.scope(); | |
var redirects = [ | |
{source: '/old1', target: '/new1'}, | |
{source: '/old2', target: '/new2'}, | |
]; | |
redirects.forEach(function (rule) { | |
scope.redirectPath = rule.source; | |
scope.redirectTarget = rule.target; | |
scope.addRedirect(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Webflow must have changed something, these aren't working anymore. It wants path and targetPath now - but I couldn't figure out how to send those properly. Just setting them on scope.path and scope.targetPath didn't work.