If you own a website, there are times you need to bring your site down for maintenance or repair. Instead of the ugly 404 page not found, a nicely crafted maintenance page is ideal for your users to see. Enter .htaccess, a powerful Apache configuration file capable of many powerful functions. It can perform authorization or authentication, redirects, custom error messages, and cache control. This article explains how to create a custom error message. TheÂ .htaccess file contains code to redirect your users to your maintenance page. In short, it uses .htaccess rewrite rule and even restricts viewing to a certain IP addresses. In this case it allows the admin to see the website as he would normally, while the rest will get a visually appealing maintenance page.