Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


antbs

370 posts

Ultimate Geek

Trusted

#31173 7-Mar-2009 16:29
Send private message

Hi guys

I was wondering if you could help me with a certain problem. Once a week from Time A to Time B I want a website I'm developing to display a message and not allow access to any other parts of the website. How would I go about doing this? I know that I can stick a tag to forward it to a different page but that requires work every single week.

The best option for me would for me to put Time A and Time B into a .csv file. As every week the time for the website to be shut down would change and every week the time for the website to be brought back up would change. This is not strictly neccesary but would be really nice to have.

Any help would be appreciated!

Create new topic
RedJungle
Phil Gale
1108 posts

Uber Geek
+1 received by user: 46

Trusted
Red Jungle
Subscriber

  #199797 7-Mar-2009 19:43
Send private message

This could be achieved any number of ways - but you haven't mentioned any details of the architecture you're using...

Server? IIS/Apache/whatever? Language? PHP/ASP.NET/Rails/etc.?



nate
6473 posts

Uber Geek
+1 received by user: 458

Retired Mod
Trusted
Lifetime subscriber

  #199842 8-Mar-2009 00:34
Send private message

RedJungle: Server? IIS/Apache/whatever? Language? PHP/ASP.NET/Rails/etc.?


I'll answer the Apache/PHP side of things since I know Mr RedJungle doesn't do it Cool

You can either do this using .htaccess with a 302 Temporary Redirect or drop a piece of code in your header file that checks a flag/database/file to see if to redirect users to a temporary file.  In times I've done this, I've print()ed to the screen, then do an exit; or return; to stop the rest of the page executing.

It .net it's much easier, just drop an app_offline.htm file into your root and you're away.

Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.