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

Inconsistent 404 behavior #51

Open
angrybrad opened this issue Nov 24, 2021 · 0 comments
Open

Inconsistent 404 behavior #51

angrybrad opened this issue Nov 24, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@angrybrad
Copy link
Member

Description

In the context of Craft, HTTP requests that 404 in nginx, get passed into Craft's index.php so it has a chance to process them

https://github.com/craftcms/docker/blob/main/nginx/default.conf#L14-L17

So mysite.com/admin will resolve to mysite.com/index.php?p=admin behind the scenes.

But if you specify a PHP script directly (i.e. mysite.com/doesnotexist.php), you'll get an nginx 404 response that doesn't get passed onto Craft.

Haven't investigated much, but likely because of this line https://github.com/craftcms/docker/blob/main/nginx/craftcms/php_fastcgi.conf#L2

@angrybrad angrybrad added the bug Something isn't working label Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant