Redirect URL from AJAX Calls
- by Vincent
All,
I have an application written in Zend MVC Framework. So, naturally all regular requests and ajax requests go through /public/index.php. I want my application to support maintenance mode.
So, in my index.php file, I have the following code:
if( Zend_Registry::get('config')->maintenance == 'true' )
{
header('Location:/maintenance.php');
}
The issue is, when ajax requests are called they render servermaintenance.php inside the page instead of redirecting to this page. How can I make sure it gets redirected instead of getting rendered?
Thanks