Hosting denied access

Website URL

https://quanlykhodanpianonguyenduy.gt.tc/

Error Message

Title: api_chat.php returns 403 while another PHP file with identical content works

Hello InfinityFree community,

My website is quanlykhodanpianonguyenduy.gt.tc.

My PHP chatbot works on localhost, but on InfinityFree, requests to /api_chat.php return HTTP 302 and redirect to https://errors.infinityfree.net/errors/403/, which returns 403 Forbidden.

What I have tested:

  • Created /kiemtra.php in /htdocs. It displays “PHP hoạt động” successfully.
  • Replaced the entire contents of /api_chat.php with the same minimal code:
<?php
header('Content-Type: text/plain; charset=utf-8');
echo 'PHP hoạt động';
  • /api_chat.php still returns 403 when opened directly, while /kiemtra.php works.
  • Deleted and recreated api_chat.php using File Manager, but the issue remains.
  • Both files are in /htdocs, and the filename is exactly api_chat.php.
  • The parent .htaccess I checked only contains DirectoryIndex and ErrorDocument directives. I have left it unchanged.
  • I could not find a way to change file permissions in File Manager.

The minimal test contains no database connection or external API calls.

Could you please help me determine whether this is caused by file permissions, a path-specific restriction, or another hosting configuration issue? What should I check next?

Thank you!

This link should help:

But to summarise, because both API’s and live chat systems can’t be hosted here (you can host it else where, and embed it here, it just cant run on InfinityFree servers) certain key words, including “Chat” automatically redirect to a 403 page.

The other thing that might cause you a problem with your project, is that the security system will block any none-browser connections going to your site. Since InfinityFree is for hosting websites not API’s

Thanks you