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

Support single page applications #23

Open
cescoferraro opened this issue Oct 19, 2017 · 0 comments
Open

Support single page applications #23

cescoferraro opened this issue Oct 19, 2017 · 0 comments

Comments

@cescoferraro
Copy link

    location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to redirecting to index.html
        try_files $uri $uri/ @root;
    }

    # If nginx can't find a file, fallback to the homepage.
    location @root {
        rewrite .* / redirect;
    }

The fallback is not actually redirecting to index.html. This is actually sending a 302 to the root.
I have not tested this yet, but I think we need to say

try_files $uri $uri/ /index.html;
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

1 participant