homepage Welcome to WebmasterWorld Guest from 54.237.54.83
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Temp maintenance page but allow developer access
View front end while in maintenance mode
RonSolo




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

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

 

g1smd




msg:4489887
 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.

RonSolo




msg:4489891
 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.

Thank you!
Ron

RonSolo




msg:4489896
 4:46 pm on Aug 30, 2012 (gmt 0)

I did a search and found instructions.

Thanks again,
Ron

g1smd




msg:4489897
 4:56 pm on Aug 30, 2012 (gmt 0)

Let's see what you've tried...

RonSolo




msg:4489925
 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?

g1smd




msg:4489963
 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.

lucy24




msg:4489986
 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved