Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login redirect #2174

Closed
jreid06 opened this issue Jul 6, 2018 · 7 comments
Closed

Login redirect #2174

jreid06 opened this issue Jul 6, 2018 · 7 comments

Comments

@jreid06
Copy link

jreid06 commented Jul 6, 2018

For security issues, please email support@getdirectus.com directly.

Version Info

  • Directus version and branch (Or commit hash):
  • PHP version: 7.2
  • MySQL version: 5.5
  • Web server: Apache
  • OS name and version:

Expected Behavior

  1. My directus data is stored in a folder called "/backend"
  2. When logged in successfully i expect it to redirect user to their dashboard either 'backend/tables' or their last location e.g 'backend/tables/blog_posts'

Actual Behavior

  1. User is logged in successfully is credentials match and url will match their last location e.g 'backend/tables/blog_posts'; HOWEVER they see the index.php in the project root so the front end of the website and not the admin side
  2. The only way then to access the backend is to then visit '/backend' and then the user is redirected to directus and can view/edit/ content for their website.
  3. This issue only happens when on the server and cannot reproduce it on my local machine. I use a Mac book pro for local development

Schema Dump, Logs, or Screenshots

The actual result below
screen shot 2018-07-06 at 09 51 06

The expected result
screen shot 2018-07-06 at 09 51 30

@jreid06
Copy link
Author

jreid06 commented Jul 6, 2018

Any ideas why this is happening? has anyone else had the same issue

@marcozellweger
Copy link

I'm having the same issue. User is logged in successfully is credentials match and url will match their last location. e.g. /admin/tables. But they see a 404 error. They must remove tables from the url and load the page again. Then the user get successfully redirected to /admin/tables

@jreid06
Copy link
Author

jreid06 commented Aug 29, 2018

Did you have any luck solving this issue? @marcozellweger

@rijkvanzanten
Copy link
Member

Could you check the value of DIRECTUS_PATH in config.php? I think that might be the thing that controls where Directus redirects to on login:

define('DIRECTUS_PATH', '/');

@jreid06
Copy link
Author

jreid06 commented Sep 4, 2018

The directus path is set to "/backend/" where my directus instance is located. On my local version everything works fine and the user is redirected to the dashboard however on the server it redirects then to the root path of the website showing index.php

@jreid06
Copy link
Author

jreid06 commented Sep 4, 2018

I then have to use javascript to redirect user to the dashboard. However This isn't an efficient solution. For now it works but i would like to fix this issue asap

@benhaynes
Copy link
Sponsor Member

Kamino closed and cloned this issue to directus/directus-6-legacy

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants