Apr
13
Use htaccess with Site Maintenance Page
April 13, 2008 |
Occasionally, your site might be under maintenance, and you want to redirect people who try to access different areas of your website to a notice page, for instance: maintenance.html. Place the code below into the htaccess file to make it work.
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !/maintenance.html$
RewriteRule $ /maintenance.html [R=302,L]
When your are done with maintenance just comment it out with the # symbol. You will also need to make the page maintenance.html
Similar Posts
- Remove File Extension Using htaccess
- htaccess Conditional Loop Redirect
- Block people from Certain URL Using htaccess
- htaccess Deny Diractory Access During a Specific Time
- Use htaccess to Fake Different File Extension
- Google Text Translation Using htaccess
- htaccess Require the www For Domain URL
- Apache htaccess Prevent Users from Uploading and Executing Files
- Create Custom Error Pages Using htaccess PHP
- htaccess Permanently redirect file or directory
- Use htaccess to Deny Access Directory Listing
- htaccess Remove the www From Domain URL
- htaccess Explicitly Define Default Index File
- Use htaccess for 404 Redirect
- Block IPs Using htaccess
- Set Local Timezone Using htaccess
- htaccess gzip for Faster Loading and Bandwidth Saving
- htaccess Limit the Number of Concurrent Visitors to your Website
- Deny Access to inc Files Using htaccess
- Use htaccess to Deny Access to hidden Files
- Force Files Like PDF Download using htaccess
- Useful mod_rewrite Resources


































