# Redirecionamento para a página inicial das categorias não ocorre com login direto

**URL:** <https://meta.discourse.org/t/redirect-to-categories-homepage-is-not-happening-with-direct-login/103782>\
**Category:** Bug\
**Created:** [Dezembro 8, 2018, 7:00pm UTC](https://meta.discourse.org/t/redirect-to-categories-homepage-is-not-happening-with-direct-login/103782 "2018-12-08T19:00:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gingerman](https://avatars.discourse-cdn.com/v4/letter/g/47e85d/32.png) [@gingerman](https://meta.discourse.org/u/gingerman)\
**Post date:** [Dezembro 8, 2018, 7:00pm UTC](https://meta.discourse.org/t/redirect-to-categories-homepage-is-not-happening-with-direct-login/103782/1 "2018-12-08T19:00:13Z")

</div>

We have a discourse setup with the following configuration

- Settings - Top Menu → categories, latest
- Wizard ([https://site/wizard/steps/homepage](https://site/wizard/steps/homepage)) - Categories boxes
- Site is public

When the site is accessed as [https://sitename](https://sitename), it is correctly redirecting to Categories Page.

**Looks like a Bug** - When the site is accessed as [https://sitename/login](https://sitename/login), it is auto redirecting to [https://sitename/latest](https://sitename/latest) before showing the login modal.

**Expected** - When the site is accessed as [https://sitename/login](https://sitename/login), it should redirect to [https://sitename](https://sitename) or [https://sitename/categories](https://sitename/categories) before showing the login modal.

If it is not a bug, kindly guide how to implement the expected scenario via a plugin

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [Dezembro 8, 2018, 11:20pm UTC](https://meta.discourse.org/t/redirect-to-categories-homepage-is-not-happening-with-direct-login/103782/2 "2018-12-08T23:20:05Z")

</div>

> [@gingerman](#):
>
> **Looks like a Bug** - When the site is accessed as [https://sitename/login](https://sitename/login), it is auto redirecting to [https://sitename/latest](https://sitename/latest) before showing the login modal.

That does sound like a bug, can you repro @jomaxro?

---

<div class="post-metadata">

**Author:** ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)\
**Post date:** [Dezembro 10, 2018, 3:22pm UTC](https://meta.discourse.org/t/redirect-to-categories-homepage-is-not-happening-with-direct-login/103782/4 "2018-12-10T15:22:45Z")

</div>

Yep, confirmed the unexpected redirect when accessing via `/login`. Thanks for the clear repro steps @gingerman!

---

<div class="post-metadata">

**Author:** ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)\
**Post date:** [Dezembro 10, 2018, 3:40pm UTC](https://meta.discourse.org/t/redirect-to-categories-homepage-is-not-happening-with-direct-login/103782/8 "2018-12-10T15:40:34Z")

</div>

Should be fixed by:

[https://github.com/discourse/discourse/commit/071bd15463fd0f9d695624d0cc82ccffa9efacf6](https://github.com/discourse/discourse/commit/071bd15463fd0f9d695624d0cc82ccffa9efacf6)

---

<div class="post-metadata">

**Author:** ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)\
**Post date:** [Dezembro 11, 2018, 6:00pm UTC](https://meta.discourse.org/t/redirect-to-categories-homepage-is-not-happening-with-direct-login/103782/9 "2018-12-11T18:00:00Z")

</div>

This topic was automatically closed after 26 hours. New replies are no longer allowed.
