Website developer Wordpress

All 404 redirect by .htaccess and PHP

All 404 redirect by .htaccess and PHP

1- Edit or create the file ..htaccess:

ErrorDocument 404 /404.php

 

2- Create the file php 404.php

<?php
//on .htacessErrorDocument 404 /404.php
header(‘location:https://www.ukgoodbye.co.uk/shop’);
?>

Example:

https://ukgoodbye.co.uk/shop/thisfileNOtExisit

 

 

Leave a Reply