The deployment is integrated with the Cloudflare Pages app from Github. I updated the repository where it used to be index.html, now it’s index.php. But when deploying to Cloudflare, the index.html page continues. I’m sure of this because in index.html the page links point to other .html pages, in the new index.php these links are .php. What should I do? I already cleared the browser cache, would it be the cache of the Cloudflare application itself?
Well first of all Cloudflare Pages doesn’t support PHP so why are you naming files .php? Are these files that actually contain PHP code, or are they just pure HTML files named .php for some reason? If they actually contain PHP code, then you’re barking up the wrong tree in terms of hosting; Cloudflare Pages might serve the files but it’ll serve them as normal HTML (or plain-text, I dunno) and the PHP code will just be visible as code in the browser instead of actually executing. If the files don’t actually contain any PHP… just rename them to .html and fix any links that need to be fixed, your life will be much simpler.
Index page functionality… if an HTTP request is received for a directory (instead of a specific file), including the root page of the site (https://example.com/) then the web server has a list of files it will check for, in order, and once one of those files is found it’ll serve that file and stop checking for others. For example, a web server might search for files in this order: index.html, index.htm, index.txt, etc. It depends how the server is configured, and with a webhost like Cloudflare Pages you generally can’t modify the search list. I couldn’t find the exact list for Cloudflare Pages but I doubt index.php is on the list.
Out of curiosity I did some testing to see what actually happens if you try to put a file named .php on Cloudflare Pages
first, if it contains PHP, it doesn’t execute, obviously
second, regardless of the contents of the file, the server will respond with
content-type: application/x-httpd-php which browsers will not even attempt to render, they’ll treat it as a file download
third, index.php is definitely not on the list of index pages searched for when a directory is requested
so no real surprises here