| 4:01 pm on Aug 30, 2012 (gmt 0)|
Send "503 Unavailable" status for all requests other than your own.
You'll need two lines of code in your htaccess file and a couple of lines of PHP code in a .php file.
| 4:09 pm on Aug 30, 2012 (gmt 0)|
Thank you! That's a great start.
How do I send the 503 Unavailable to all requests but my own?
Can you provide the lines of code for the htaccess and the php? I'm completely new at this.
| 4:46 pm on Aug 30, 2012 (gmt 0)|
I did a search and found instructions.
| 4:56 pm on Aug 30, 2012 (gmt 0)|
Let's see what you've tried...
| 6:03 pm on Aug 30, 2012 (gmt 0)|
Actually .... can I use an HTML page to show a styled maintenance message instead of the php file? Or does it have to be a php file?
| 8:05 pm on Aug 30, 2012 (gmt 0)|
You can send a normal looking HTML page from within a .php file. It's even possible to configure a server to look for PHP code inside .html files.
You need the PHP functionality in order to be able to use the PHP HEADER directive to send the 503 status code.
| 9:45 pm on Aug 30, 2012 (gmt 0)|
Your maintenance message can simply be set up as a custom 503 ErrorDocument. All requests except the ones from your own IP-- or your own browser, or whatever is appropriate for your case-- get a 503 response. Make sure to leave a loophole to let the error document itself get served ;) I make it one RewriteRule with two Conditions.