Cf pages url is deleting page extension

Hello

server delete the page extension in the Cloudflare pages url.

e.g; site.com/page.html → CF:Status Code: 308 → location → site.com/page

and the extension .html does not appear in the url only https://site.com/page

it seems, how can i fix this?

1 Like

https://developers.cloudflare.com/pages/platform/serving-pages/#route-matching

Route matching
If an HTML file is found with a matching path to the current route requested, Pages will serve it. Pages will also redirect HTML pages to their extension-less counterparts: for instance, /contact.html will be redirected to /contact, and /about/index.html will be redirected to /about/.

If you want “site.com/page” to work, you can do this in your source code:

website/page/index.html

Rather than this:

website/page.html
1 Like

this is too bad, page route javascript codes are not working as it redirects to delete html.