When your website is being maintenance, users could get an error page from your hosting provider when they visited a webpage. This maybe cause you lose your website technology secret. To avoid that, you can use simple command in .htaccess file to redirect all page to default page.
<IfModule mod_rewrite.c
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
Replace index.html with your default page such as default.php, index.php,...
Upload an .htaccess file contains that codes to your root hosting directory (something like: htdocs, www, public_html,...).
Wish succeed!
Comments
Post a Comment