# Redirect discover page to login page

**URL:** <https://community.taiga.io/t/redirect-discover-page-to-login-page/5291>\
**Category:** Self hosted Taiga\
**Tags:** docker\
**Created:** [February 14, 2025, 12:24am UTC](https://community.taiga.io/t/redirect-discover-page-to-login-page/5291 "2025-02-14T00:24:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![khormine](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/khormine/32/3759_2.png) [@khormine](https://community.taiga.io/u/khormine)\
**Post date:** [February 14, 2025, 12:24am UTC](https://community.taiga.io/t/redirect-discover-page-to-login-page/5291/1 "2025-02-14T00:24:29Z")

</div>

Hi ! I’m looking for a way to restrict unauthenticated users access by showing them only the **/login** page. I know that by default, **unauthenticated users** have access to the **/discover** page. Therefore, I want to redirect the **/discover** page to the **/login** page. I tried doing this by adding the following to the nginx configuration file :

```auto
    location /discover {
        return 301 /login;
    }

```

But it seems that it doesn’t work. When an unauthenticated user visits the URL **mytaiga.lan** , they are redirected to **mytaiga.lan/discover** but not to **mytaiga.lan/login**.

However, when they visit the URL **mytaiga.lan/discover** instead of **mytaiga.lan** , they are correctly redirected to **mytaiga.lan/login**.

Any help would be greatly appreciated. Thank you !

---

<div class="post-metadata">

**Author:** ![csmu](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/csmu/32/2289_2.png) [@csmu](https://community.taiga.io/u/csmu)\
**Post date:** [February 16, 2025, 12:10am UTC](https://community.taiga.io/t/redirect-discover-page-to-login-page/5291/2 "2025-02-16T00:10:44Z")

</div>

> [@khormine](#):
>
> ```auto
> location /discover {
> return 301 /login;
> }
> 
> ```

Try adding the following to the nginx config file

```auto
    location = / {
        return 301 /login;
    }

```

and remove any existing `location = /` block

Cheers!
