403 Forbidden error when sending a POST request to a PHP file

Website URL

https://tester.page.gd/view_profile.php?id=2

Error Message

When submitting a form, I am redirected to the standard InfinityFree 403 Forbidden error page. The page says:

“403 Forbidden
You don’t have permission to access this resource on this server.”

In the browser’s developer tools, the network tab shows that the POST request to my file /_chat_action_handler.php failed with a 403 status code.

Other Information

Hello Support Team,

I am developing a web application with a feature that allows users to send chat requests. This action sends a POST request to a PHP script named _chat_action_handler.php to process the data.

However, every time this POST request is sent, it gets blocked by the server and returns a 403 Forbidden error. I have checked my file permissions, and the code itself is correct.

I strongly suspect that this is being caused by a server-side security rule, most likely mod_security, that is incorrectly flagging this legitimate request as suspicious.

Could you please check the security logs for my account and whitelist my script /_chat_action_handler.php or disable the specific security rule that is causing this block?

Thank you for your assistance.

In short, using the word “chat” in filenames is forbidden.

Thank you, this solved my problem. My problem was with the files, and you solved it, this solved my problem. My problem was with the filenames and i have fixed it. Thank you.

The reason the word chat is blocked, is because infinity free don’t allow live chats hosted here.

That said, you can embed a chat service from elsewhere if you need that functionality