groups

name language licence
TINYURL ON EVERY WORDPRESS-POST PHP BSD
Display an External RSS Feed PHP BSD
Multiple backgrounds with CSS3 CSS 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

< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 >



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...)