I am using Zend framework on wamp. I am using .htaccess file to redirect the request to public/ directory. The .htaccess file i am using contains
RewriteEngine On
RewriteRule ^\.htaccess$ - [F]
RewriteCond %{REQUEST_URI} =""
RewriteRule ^.*$ public/index.php [NC,L]
RewriteCond %{REQUEST_URI} !^public/.*$
RewriteRule ^(.*)$ public/$1
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [NC,L]
RewriteRule ^public/.*$ public/index.php [NC,L]
and now when I access the site folder it get redirected towards the public/index.php but it get an error. Here is my script, indicating where the error occurs.
<?php
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library/'),
get_include_path(),
)));
/** Zend_Application */
require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
Till this part it's working, the remaining portion causes the error
$application->bootstrap()
->run();
and Error is page not found error. Anyidea what is causing this