Error 404 in CodeIgniter code

Website URL

https://pacmanapicaparrella.wuaze.com/test-db doesnt work, without test-db works fine.

Error Message

Other Information

Tried googleing, chatgpt, copilot…nothing works…

My idea is that im implementing using JS in client a pacman game. So i want to make a api rest code, so from client i can login with username and password, get user statistic ( total games played, total games won, total lost…), top ten players, player or user config and logout…

So if i develop in home i got CORS error ( localhost)

So the first steps would be run the app

Test-db i want to test if connection to database is ok or is falling/connection cant be done…

Thanks in advance also if you want to see the code:

Note i need this for educational purpose and would be nice that someone can help me, because with my students we are stuck in getting api work because of CORS error. So i need to connect to the api some kind fetch(“…/v1/login”)

Welcome to the community.
I’m not seeing any 404 error at the provided URL:


Also, if you are making requests to the hosted API from your local machine, you will encounter a CORS error. This behavior is intentional and cannot be removed:

8 Likes

Now i have changed .htaccess and seems to work, dont know exactly what i die:

# Evita el acceso a archivos sensibles
<Files .env>
    Order allow,deny
    Deny from all
</Files>

# Redirección de URLs amigables
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

So my idea was to contact from github/vercel to infinityFree from a form like and inside the submit code, include a fetch instruction with user and password…and get the response in the web

Is there any way i can do it ? In vite/vercel i have a pacman game implemented in js/html and i want from there to get info from last games, my profile, top 10 players… all information come from infinityfree codeigniter and mysql database..

Thanks

No, as I already mentioned, you cannot send requests to your website from outside it. This means the form on GitHub or Vercel won’t work because it won’t be able to send a request to your InfinityFree hosted site to be able to fetch the information.

7 Likes

Thanks you know any way i can do it ? any other platform or solution ??

1 Like

One way to solve the issue is to also host the HTML and JS with us. Our hosting supports PHP code, but it will also work just fine for static content.

6 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.