Form ACTION URL contains /index.php causing a 403

I recently upgraded from 1.4.1 to 2.1.1.



My previously working embedded forms no longer worked. I was getting a 403 error.



Looking in the browser console, I noticed that they were being redirected as a POST to a GET using a 301 redirect. Since a GET is not allowed for the form submission, it resulted in a 403.



I looked at the cut-and-paste code recommended in Mautic for the form, and it included:


<form autocomplete="false" role="form" method="post" action="https://myhost.com/index.php/form/submit?formId=8" ...

Since none of my other pages use the "/index.php" portion in the URL, I changed it to:

<form autocomplete="false" role="form" method="post" action="https://myhost.com/form/submit?formId=8"

Now the form is working again.

I created a new form after the upgrade, and the URL does not contain the "/index.php" portion. I guess the cut-and-paste code must get saved somewhere with the form configuration from the previous version of Mautic, so it still shows the previous version of the URL.

I recently upgraded from 1.4.1 to 2.1.1.

My previously working embedded forms no longer worked. I was getting a 403 error.

Looking in the browser console, I noticed that they were being redirected as a POST to a GET using a 301 redirect. Since a GET is not allowed for the form submission, it resulted in a 403.

I looked at the cut-and-paste code recommended in Mautic for the form, and it included:

<form autocomplete="false" role="form" method="post" action="https://myhost.com/index.php/form/submit?formId=8" ...

Since none of my other pages use the “/index.php” portion in the URL, I changed it to:

<form autocomplete="false" role="form" method="post" action="https://myhost.com/form/submit?formId=8"

Now the form is working again.

I created a new form after the upgrade, and the URL does not contain the “/index.php” portion. I guess the cut-and-paste code must get saved somewhere with the form configuration from the previous version of Mautic, so it still shows the previous version of the URL.