0

I moved a static website, built with 11ty, from AWS to Cloudflare pages. I am having a problem: Cloudflare is not handling .html at the end of URLs the same way that AWS was.

So, for example --

The second link with the HTML extension is broken. This is a problem because there are a lot of outstanding links which have .html at the end.

Is there some configuration detail in Cloudflare, or in Eleventy, which can restore these URLs to a working state?

1 Answer 1

2

To answer my own question, the solution was to create a file named _redirects (with no file extension) in the root folder of my project containing:

/*.html /:splat 301 

This redirects people to the working URLs, per the documentation

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.