groups

name language licence
Custom post title with lead graphic background PHP BSD
Create A Maintenance Page For Your WordPress Blog HTML BSD
Display Related Posts Without A Plug-In PHP BSD
Resize Images On The Fly PHP BSD
opacity background PHP BSD
Untitled Snippet PHP BSD
Custom Fonts using @font-face HTML BSD



language: HTML
licence: BSD

Create A Maintenance Page For Your WordPress Blog

options: view full snippetsend to code collector
//The solution. To solve this problem, we use the power of the .htaccess file. Just follow the steps below to get started.
//Create your maintenance page. A simple WordPress page is generally sufficient.
//Find your .htaccess file (located at the root of your WordPress installation) and create a back-up.
//Open your .htaccess file for editing.
//Paste the following code:

RewriteEngine on  
RewriteCond %{REQUEST_URI} !/maintenance.html$  
RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123  
RewriteRule $ /maintenance.html [R=302,L]  


//Replace 123\.123\.123\.123 on line 3 with your IP address (Don’t know it?). Make sure to use the same syntax.
//Now, all visitors except you will be redirected to your maintenance page.
//Once you’re done tweaking, upgrading, theme switching or whatever, re-open your .htaccess file and remove (or comment out) the redirection 
	
(Continues...)