https://siluets.netlify.app
Read the support file. Add _redirects file and still got this error:
Hi @ArtursBuls, thanks for the post and welcome to the Netlify Support Forums.
Kindly checkout the support guide below for possible reasons for the Not found page.
Also since you tagged the post as angular, checkout the links below for how to resolve similar problems.
If the above does not help, kindly share the contents of your _redirects
file and also a snippet of your build logs.
Thanks.
Thanks.
dist/siluets
solves the problem.
After the page refresh, I still got 404, but this is not a problem. Open the link again)))
Hi @ArtursBuls, thanks for the feedback.
I visited your site and it looks like https://siluets.netlify.app
redirects to https://siluets.netlify.app/home
The not found error happens because after a refresh the home
route does not exist.
You need to also have a home
component that renders when the path is home
and then use your router package to handle path to home
Also if the content in your _redirects
does not match the code below, kindly change it to the code below and then try again to see if it works.
/* /index.html 200
However if the content in your _redirects
file is the same as the code above, if possible kindly share a repository or a minimal version of your site for me to help with the debugging.
Thanks.
Sure. I made the repo visible. https://github.com/ArtursBuls/siluets
Would be nice if you can able to look into my codeā¦
Thanks.
treÅ”d., 2023. g. 13. sept., plkst. 13:44 ā lietotÄjs Clarence A. via Netlify Support Forums (<notifications@netlify.discoursemail.com>) rakstÄ«ja:
Hi
https://siluets.netlify.app/#/contacts
export const HttpLoaderFactory = (http: HttpClient): TranslateHttpLoader => new TranslateHttpLoader(http);
export const appConfig: ApplicationConfig = {
providers: [
provideRouter(APP_ROUTES, withInMemoryScrolling({ scrollPositionRestoration: āenabledā }), withHashLocation()),
importProvidersFrom(
TranslateModule.forRoot({
defaultLanguage: ālv-LVā,
loader: {
provide: TranslateLoader,
useFactory: HttpLoaderFactory,
deps: [HttpClient],
},
})
),
provideAnimations(),
provideHttpClient(),
],
};
seems the problem is solved, but Iām not sure that is the correct wayā¦
treÅ”d., 2023. g. 13. sept., plkst. 14:36 ā lietotÄjs ArtÅ«rs Buls (<arturs.buls@gmail.com>) rakstÄ«ja:
Hi @ArtursBuls, thanks for the extra feedback.
A better solution is that you have to add the scr/_redirects
to the assets
array in your angular.json
file
Your assets section in your angular.json
should look like the below
...
"assets": [
"src/favicon.ico",
"src/assets",
"src/_redirects"
],
...
Try the above and then redeploy. It should work as expected.
Thanks.
Thanks, man. I almost broke my mind by solving this))).
Good luck.
treÅ”d., 2023. g. 13. sept., plkst. 17:23 ā lietotÄjs Clarence A. via Netlify Support Forums (<notifications@netlify.discoursemail.com>) rakstÄ«ja:
Hi @ArtursBuls, thanks for sharing.
Glad to know the suggestion helped.