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

_redirect for netlify #32

Open
Priyanshu85 opened this issue Jan 11, 2023 · 3 comments
Open

_redirect for netlify #32

Priyanshu85 opened this issue Jan 11, 2023 · 3 comments

Comments

@Priyanshu85
Copy link

When reloading on netlify it shows Page not found. This can be solved using redirects file in the public folder

@khalidfasely
Copy link

What the content of the file should look like:

I tried this, but it isn't working
/ecommerce https://lek-dashboard.netlify.app/ecommerce 301

@Priyanshu85
Copy link
Author

Priyanshu85 commented Jan 17, 2023

/* /index.html 200

Make a file named _redirects in the public folder and add the above content in it.
@khalidfasely

@khalidfasely
Copy link

Thank you, I tried this, and it worked for me:
create a netlify.toml on the public folder with this content

[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200

then run build
@Priyanshu85

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