Page Not Found Looks like you've followed a broken link wen deploy react

PLEASE help us help you by writing a good post!

The better the post - the faster the answer.

it still work in localhost

@ZenPilate24 You may have more than one issue, but here’s an answer I gave someone else that perfectly explains one of the issues you’re facing:

1 Like

@nathanmartin
thank for support but
When I set the forwarding settings like this, my site loads but the content is not loaded. I think it’s trying to load the Login page, but now that it’s in the URL,when I reload the url it still woking.
Deploy details | Deploys | zenpilates | Netlify
my link : https://thaitien.id.vn/
1: go my link ( now it not working)
2 press F5 (everything good)
3: login with test account
Username: Tient
password : Tient
4: press sign in ( not thing working)
5: press F5 go to my account page
it the same action with any redirects with react , please help

@ZenPilate24 Whatever issue you’re experiencing, it just seems to be your app.

If you go to:
https://zenpilates.netlify.app
or
https://thaitien.id.vn

It looks like it redirects to /login in the browser URL bar, but checking the network tab you will see it there was no actual redirect. So it’s not the same as when you directly visit /login or do a refresh on that page.

Your application is adjusting the history state, basically faking a page change to /login

How that handling is happening, and what it’s displaying, is entirely up to your application.
You should check your code.

in source code i used:


and

import { useNavigate } from "react-router-dom";
const navigate = useNavigate();
navigate("/admin");

and it work good at localhost, please help, if you have some sample for this issuse, please give me to apply to this project, thank for you help

@ZenPilate24 Sorry but I don’t use react myself, so I can’t give you any guidance off the top of my head for working with it.

Try simulating the same thing as on Netlify.

Run your actual Build command locally, (not your Develop command), then serve the output with npx serve

you are right, when i build at local , it work the same thing when deploy ,
actuary error form my code, if you have some suggest, please help

The URL you mentioned appears to be working fine.