piyush-eon / url-shortener

Full Stack URL Shortener with React JS, Tailwind CSS, Supabase, Shadcn UI Tutorial 🔥🔥
https://youtu.be/geIwBIuo-ug
17 stars 10 forks source link

Redirect Logic not working #2

Open LVSSandeepKumar opened 2 months ago

LVSSandeepKumar commented 2 months ago

When deployed on vercel or netlify or render, the redirect link is not working. The response is error 404 from server.

As of what I understood from my research through chatgpt and google is these platforms require a html file for each route or page. I created an empty div for the '/:id' route and yet it is not working....

I desperately need such a eye-catching project in my portfolio, so please try to fix it.

Thank you.

amol1211 commented 1 month ago

hey did you find the solution?

amol1211 commented 1 month ago

plz let me know when you find one

LVSSandeepKumar commented 1 month ago

I have moved on from the project. I won't try to find a solution.

shivang21007 commented 3 weeks ago

@amol1211 @LVSSandeepKumar

Bro Redirect Logic is Working perfectly fine , you just have to do some setup, In the video, he hard coded the domain name, so you have to first create a env variable name = VITE_BASE_URL=http://localhost:5173

and then manually locate all hard coded domain names and replace it with a vaible name -

const baseUrl = import.meta.env.VITE_BASE_URL; ${baseUrl}/${link} Like this everywhere in project.