rkingon / Craft-Plugin--Redirect-Manager

MIT License
46 stars 16 forks source link

Break after finding a redirectLocation #16

Closed johnolek closed 8 years ago

johnolek commented 8 years ago

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

rkingon commented 8 years ago

Looks good to me, thanks