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

After bin/magento application redirects to /index.php #42

Closed
torhoehn opened this issue Nov 26, 2019 · 1 comment
Closed

After bin/magento application redirects to /index.php #42

torhoehn opened this issue Nov 26, 2019 · 1 comment

Comments

@torhoehn
Copy link
Contributor

I set up an Magento 2 environment via composer and it was working perfectly fine, but after running bin/magento setup:upgrade I got redirected to /index.php. Are there any experiences with this?

Before bin/magento setup:upgrade
Screenshot 2019-11-26 at 21 13 02

After bin/magento setup:upgrade
Screenshot 2019-11-26 at 21 16 13

The only thing to make it work again was to run the bin/magento setup... again.

@davidalger
Copy link
Collaborator

Hi @torhoehn - I've also seen this. In every case though a simple bin/magento cache:flush fixed the issue. It stems I believe from Magento not having a Base URL set and caching a bad URL. Maybe try setting base URLs in env.php (examples of doing this can be found here: https://gist.github.com/davidalger/3101b61996af0010dcf9035b7db894e8#file-env-php-warden-php-L114-L150) or saving base URLs via the Magento admin?

If you think this is something else, feel free to say so. Perhaps it would be good to amend the documented setup steps to include setting an explicit base URL to avoid this. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants