I have been using Joomla and I love its administrative facility to put the site down for maintenance. As I have seen, all requests to the site if it is in maintenance mode is routed to a single page. If I want to add my own "site down for maintenance" module for a non-Joomla site, how do I do this? I am using an MVC framework in PHP called Kohana in its version 2 which is similar with Codeigniter. I have a Router class where I can control where a certain address go. The only approach I can think is redirect every request to a particular controller function when site is down, but how do I do this? I can't possibly manually re-route all urls right?
Take a look at the routing documentation. You should be able to use a regular expression that redirects any uri to a specific controller/action. The only question left would be how to turn that rule on/off.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With