Force 404
This article outlines how to set all website pages to 404 using.htaccess and Rewrite conditions. Access the cPanel account for the website you wish to redirect. Check.dotfiles are set to visible. Edi…
Updated
by Zak Guy
This article outlines how to set all website pages to 404 using .htaccess and Rewrite conditions.
- Access the cPanel account for the website you wish to redirect.
- Check .dotfiles are set to visible.
- Edit the .htaccess file and add the code below to the top of the file.
- Save the changes and the site will now display a 404 error when visited.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^exampledomainname.co.uk$ [OR]
RewriteCond %{HTTP_HOST} ^exampledomainname.co.uk$
RewriteRule (.*)$ https://www.exampledomainname.co.uk/$1 [R=404,L]
</IfModule>
How did we do?
Cleaning hacked sites