Submitting forms go to the default page, and not a custom page

I have been fighting with the forms for a little bit now, and I’ve tried using the AI chatbot, but nothing worked.
My problem is that when I submit a form in my website, it goes to the default netlify submit page, instead of going to my custom one.

Here is some code:

    <div class="#">
      <form 
        name="contact" 
        method="POST" 
        data-netlify="true" 
        action="/form-submission/deleted"
        class="#"
        >
        
        <input type="hidden" name="form-name" value="contact">
        <h2>#</h2>

        <input
          type="#"
          name="#"
          placeholder="#"
          required
          class="#"
        />
        
        <input
          type="#"
          name="#"
          placeholder="#"
          required
          class="#"
        />
        
        <button type="submit" class="#">Submit</button>
        <p class="# id="thankYouMessage" style="display: none;">#</p>
      </form>
    </div>

In my code, I did replace some stuff with #.

@G_G Does /form-submissions/deleted.html exist as a page?

yes. it does. and if i go straight to the link, it goes there normally

@G_G Since what you have is seemingly as per the documentation:
https://docs.netlify.com/forms/setup/#custom-success-page

If…

  • The form is in static HTML
  • The form has the data-netlify attribute
  • A deploy has been run
  • The form is listed as detected in the deploy log
  • Netlify accepts the POST submission with the correct form-name
  • The form has the action specified on it when the browser performs the submit
  • The ‘success page’ exists as its own html file (not just a route in an SPA)
  • There are no redirects / edge functions / service workers interferring

Then I’d expect it to work.

Are you able to share the site URL?

Yes.
My site url is: Start
The form specifically is at Biruni ID

@G_G I see:

Upon submission the browser navigates to:

So the URL that it lands on is correct.

If I navigate directly to /form-submission/deleted I see:

Which is served with a 404 status

It just seems to be your custom 404 page, as it also appears for random other URL’s like:

/this/page/does/not/exist

So I again just fall back to what I said earlier:

Make sure it does.
Make sure the URL’s are correct.
Check what files exist in your deployment with the Deploy File Browser.

This is what I have inside of it:

It seems to be a real page.

@G_G That’s a completely different URL.

That’s not:
/form-submissions/deleted

It is:
/biruni-start/form-submission/deleted

Which loads here:
https://biruniweb.netlify.app/biruni-start/form-submission/deleted

Thank you. It works now.