Transform rule

How can I write a rule that will show any page of the form
{page}.html as {page}

Regex requires a Business or Enterprise plan.

You can do it in a worker. You might need to add some conditional testing around resolving / index, but something basic like this would work.

addEventListener(‘fetch’, event => {
const request = event.request
const newUri = request.url + “.html”;
return event.respondWith(fetch(newUri));

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