# Invalid directories redirecting to SSO Login Page

**URL:** <https://forum.yunohost.org/t/invalid-directories-redirecting-to-sso-login-page/30720>\
**Category:** Discuss\
**Tags:** sso, english\
**Created:** [August 9, 2024, 4:01am UTC](https://forum.yunohost.org/t/invalid-directories-redirecting-to-sso-login-page/30720 "2024-08-09T04:01:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![toadnotfrog](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/t/13edae/32.png) [@toadnotfrog](https://forum.yunohost.org/u/toadnotfrog)\
**Post date:** [August 9, 2024, 4:01am UTC](https://forum.yunohost.org/t/invalid-directories-redirecting-to-sso-login-page/30720/1 "2024-08-09T04:01:14Z")

</div>

Hello fellow selfhosters

### My YunoHost server

**Hardware:** VPS bought online  
**YunoHost version:** 11.2.27 (stable)  
**I have access to my server :** Through SSH  
**Are you in a special context or did you perform some particular tweaking on your YunoHost instance ?** : no  
**If yes, please explain:**  
**Self-hosting experience** noob

### Invalid directories redirecting to SSO login page

Invalid directories such as _[https://mydomain.tld/foo](https://mydomain.tld/foo)_ redirect to the YunoHost Admin Portal _[https://mydomain.tld/yunohost/sso/](https://mydomain.tld/yunohost/sso/)…_

This is not a new issues see 1. [Stop redirecting to SSO portal by default, report HTTP error instead](https://forum.yunohost.org/t/stop-redirecting-to-sso-portal-by-default-report-http-error-instead/23832) 2. [App redirecting to SSO](https://forum.yunohost.org/t/app-redirecting-to-sso/4074) or 3. [Redirect SSO to subdomain](https://forum.yunohost.org/t/redirect-sso-to-subdomain/16473) 4. [How to stop non registered sub domains from redirecting to admin interface?](https://forum.yunohost.org/t/how-to-stop-non-registered-sub-domains-from-redirecting-to-admin-interface/3186)

I have tried editing the _/etc/ssowat/conf.json.persistent_ file to  
`{ "skipped_urls": ["mydomain.tld/landing_page"] }`  
I did not notice any changes - invalid URLs still redirected to Login Portal.

and

`{ "redirected_regex": { "https?://[^/]+/(?!app1[\\Z/]|app2[\\Z/]|yunohost[\\Z/]|\\.well-known/).*": "https://mydomain.tld/landing_page" } }`

all URLs redirected to _[https://mydomain.tld/landing\_page](https://mydomain.tld/landing_page)_

I have also editing the _/etc/nginx/conf.d/yunohost\_admin.conf_ file

from

` location /yunohost { # Redirect most of 404 to maindomain.tld/ access_by_lua_file /usr/share/ssowat/access.lua; }`

to

` location /yunohost { return 302 https://mydomain.tld/landing_page; }`  
with no noticeable change - invalid URLs redirected to SSO page

I have not tried [configuring to this guide](https://github.com/YunoHost/SSOwat/tree/dev) as I do not know what to change.

What did I do wrong?

Thanks!

* * *

---

<div class="post-metadata">

**Author:** ![system](https://forum.yunohost.org/uploads/default/original/2X/f/f59fe8e3ee6b100b4f574d30d6e30479c68b89f0.png) [@system](https://forum.yunohost.org/u/system)\
**Post date:** [September 8, 2024, 4:01am UTC](https://forum.yunohost.org/t/invalid-directories-redirecting-to-sso-login-page/30720/2 "2024-09-08T04:01:28Z")

</div>

Closed on September 8, 2024, 4:01am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
