Welcome to WebmasterWorld Guest from 54.161.64.174

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Temp maintenance page but allow developer access

View front end while in maintenance mode

     
3:06 pm on Aug 30, 2012 (gmt 0)

5+ Year Member



I need to be able to temporarily put a website in maintenance mode, showing a maintenance 'splash' page to the general public ... but I still need to be able to make changes to the website and be able to view the changes on the front end.

So I need to still view the front end of the site while it's down for maintenance.

How exactly can I do this?

Are there any commercial software available that will do this?

Thank you,
Ron
4:01 pm on Aug 30, 2012 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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)

5+ Year Member



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.

Thank you!
Ron
4:46 pm on Aug 30, 2012 (gmt 0)

5+ Year Member



I did a search and found instructions.

Thanks again,
Ron
4:56 pm on Aug 30, 2012 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Let's see what you've tried...
6:03 pm on Aug 30, 2012 (gmt 0)

5+ Year Member



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)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



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.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month