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.phpin/htdocs. It displays “PHP hoạt động” successfully. - Replaced the entire contents of
/api_chat.phpwith the same minimal code:
<?php
header('Content-Type: text/plain; charset=utf-8');
echo 'PHP hoạt động';
/api_chat.phpstill returns 403 when opened directly, while/kiemtra.phpworks.- Deleted and recreated
api_chat.phpusing File Manager, but the issue remains. - Both files are in
/htdocs, and the filename is exactlyapi_chat.php. - The parent
.htaccessI checked only containsDirectoryIndexandErrorDocumentdirectives. 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!