Using Page Rule to do Bulk Redirect of URLs ending in .html

Long story short, I want to redirect any urls ending in .html to the homepage of a site.

Some examples of URLs to be redirected include:
example.com.au/mall.php?87508/1091797.html
example.com.au/6512/1569149.html

I’ve configured two page rules, both 301 redirects to the homepage, matching on the following:
Rule 1: example.com.au//.html
Rule 2: example.com.au/*.html

However this doesn’t work, and I can’t seem to work out what I’m doing wrong. Any help would be great.

For those curious, these URLs are leftover from a Japanese keyword hack (new site now anyway). They currently just go to 404s on the site, however some browsers are marking them as suspicious, not sure why. So I’m hoping to redirect them at the DNS.

Hi,

From an SEO perspective, they should indeed go to a 404 so that Google de-index them. As long as Googlebot is not blocked from your site, these pages will eventually be dropped from their index. If you redirect them, your site may face a Soft 404 penalty, and perhaps would still be marked as malicious by some browsers.

In case you insist on redirecting them, Rule 2 should suffice. Make sure it’s placed above any other Page Rule that may affect your whole site, as just one PR is triggered per request.