-
Notifications
You must be signed in to change notification settings - Fork 181
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
404 \ Page not found when deploying to Netlify #101
Comments
Sure! Any chance there's a way to define that in the .toml file? If not then a separate does file is fine. |
Unfortunately no. Netlify does in in 1 way only, which is having a _redirects file in the deployed folder eg |
Ref: (https://www.netlify.com/docs/redirects/)[https://www.netlify.com/docs/redirects/] Looking more into this... |
I think we decided to punt on this for now, right? |
I think it's very good to have and won't harm if people won't need it! if ytou think so too, here's a PR #103 |
I think people need this. I had to go through a lot of pain to get to understand how to use this. It is really helpful especially for situations where you decide to use routers from you js application |
You need to configure the fallback HTML page. You can do this by simply copying |
actually i have the same problem, anybody can say exactly what i should do. Thanks |
in my case, for create-react-app:
|
but how I had the same problem and it solved but could you please explain what is the reason behind it? |
i have the same problem please help |
same :/ |
I think, my situation is there isn't the index.html page. so that why the
server doesn't know which page to take. So to solve the problem, try to put
an index.html page.
Le mer. 22 janv. 2020 à 23:17, Harold ARABA <notifications@github.com> a
écrit :
… i have the same problem please help
same :/
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#101?email_source=notifications&email_token=AKBZXYY7SQJFVGATJRROC33Q7DAYLA5CNFSM4C3VKEGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJVJZOA#issuecomment-577412280>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKBZXYYZFPHNK2EFOWOS7ATQ7DAYLANCNFSM4C3VKEGA>
.
|
thanks man! it worked for me |
I'm not sure if other static site servers / platforms are all like that, but if we deploy this to Netlify we can only navigate from index.html to other pages using Links, once your refresh or type a URL directly in the address bar we'll get 404
In order to get History push state to work we need to add this re-write rule:
which can be in a file for Netlify in the repo root.
Can we add this directly? as I can see Netlify support is welcome in the Preact repo.
The text was updated successfully, but these errors were encountered: