cyprich.com

By

Take a Website Offline with .htaccess

How to make a web site or folder on the site offline in Apache through .htaccess.

 

A website or folders within it can be taken down by pointing search engine crawlers to the 410 status code. This code notifies the user that the resource is no longer available on the server and no forwarding address is available.

Make Website Offline

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    Redirect 410 /
</IfModule>

Make Folder Offline

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    Redirect 410 /blog-post-you-deleted
</IfModule>

Leave a Reply

Your email address will not be published. Required fields are marked *