Use AWS cloudfront / S3 / Route53 to block all old .php webpages

24 views Asked by At

I have just migrated a website. In the old website all of the pages ended in .php aka www.<domain>.org/login.php. The new website has bee created using react hosted in S3 with cloudfront. Google still displays all the old php pages, and I am only able to give a soft 404 error when an old page is visited.

How could I add in the tech stack I'm using a way of returning 404 errors for all the old .php pages. I ideally want to be able to use a rule as there are 100's of these old pages.

0

There are 0 answers