Currently this foreach loop will always go through ALL redirects. This means that the calculation for whether or not to prepend the site URL to the redirect is based on the LAST record, not the record corresponding to the redirect that was found. The redirect type could also be incorrect because of this.
I think this should resolve an issue we're having where external redirects are getting the siteUrl prepended to them. Let me know if you see any issues with this solution.
Currently this foreach loop will always go through ALL redirects. This means that the calculation for whether or not to prepend the site URL to the redirect is based on the LAST record, not the record corresponding to the redirect that was found. The redirect type could also be incorrect because of this.
I think this should resolve an issue we're having where external redirects are getting the siteUrl prepended to them. Let me know if you see any issues with this solution.
Thanks! John