# Redirect to external site in a plugin?

**URL:** <https://meta.discourse.org/t/redirect-to-external-site-in-a-plugin/132932>\
**Category:** Development\
**Created:** [8 november 2019 om 15:30 UTC](https://meta.discourse.org/t/redirect-to-external-site-in-a-plugin/132932 "2019-11-08T15:30:46Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [20 november 2019 om 22:39 UTC](https://meta.discourse.org/t/redirect-to-external-site-in-a-plugin/132932/6 "2019-11-20T22:39:51Z")

</div>

I’m fairly certain that because the login modal is done in AJAX (in `base_url/session`) the browser refuses to do a `redirect_to` without the other side sending CORS headers.

What I think that I need is some way to (and I have no idea how to describe this) get out of AJAX so that to the browser it looks like a normal redirect, not a redirect in AJAX.

Or, is there some way to get the login to be a non-ajax page?

---

_[View the full topic](https://meta.discourse.org/t/redirect-to-external-site-in-a-plugin/132932)._
