diff --git a/document_root/.htaccess b/document_root/.htaccess index 4170493926cbcbc77f481b44962081233d8d4ed3..ba9badaa1b40d12efe025e433e6ca5223fd6667a 100644 --- a/document_root/.htaccess +++ b/document_root/.htaccess @@ -1,4 +1,9 @@ Options FollowSymLinks RewriteEngine On + RewriteRule ^tinymce - [L] -RewriteRule !(\.(js|ico|gif|jpg|png|css|oss|swf|mov)|index.php|phpinfo.php)$ index.php +RewriteRule ^index.php - [L] +RewriteRule ^phpinfo.php - [L] +RewriteRule \.(js|ico|gif|jpg|png|css|oss|swf|mov)$ - [L] + +RewriteRule (.*) index.php/$1 [L] diff --git a/document_root/index.php b/document_root/index.php index 9f230f27023210c2b27a0e6ab5c77aafdf753463..bc175e6578f90580aa1719d59c61d4e901ee7b09 100644 --- a/document_root/index.php +++ b/document_root/index.php @@ -8,7 +8,6 @@ set_include_path(get_include_path() . PATH_SEPARATOR . APPLICATION_PATH . '/mode set_include_path(get_include_path() . PATH_SEPARATOR . APPLICATION_PATH . '/models/tables'); require_once('Zend.php'); spl_autoload_register(array('Zend', 'loadClass')); -//$_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'], strlen(dirname($_SERVER['PHP_SELF']))); //$appReg = Nmc_Registry_Application::getInstance(); $db_config = array('host' => $db_host, @@ -21,7 +20,9 @@ Zend_Db_Table::setDefaultAdapter($db); Zend::register('db', $db); $router = new Zend_Controller_RewriteRouter(); -$router->addRoute('compat_params', ':controller/:action/:0/:1/:2/:3/:4/:5/:6/:7/:8/:9/:10/:11/:12'); +$default_route = new Zend_Controller_Router_Route(':controller/:action/:0/:1/:2/:3/:4/:5/:6/:7/:8/:9', + array(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)); +$router->addRoute('compat_params', $default_route); $controller = Zend_Controller_Front::getInstance(); $controller->setRouter($router);