Index: trunk/core/kernel/utility/http_query.php =================================================================== diff -u -r3214 -r3215 --- trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 3214) +++ trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 3215) @@ -132,20 +132,6 @@ case 'G': $this->Get = $this->AddVars($_GET); $this->processQueryString(); - if( $this->Application->RewriteURLs() ) - { - if( $this->Application->isDebugMode() ) - { - $this->Application->Debugger->profileStart('url_parsing', 'Parsing MOD_REWRITE url'); - $this->processRewriteURL(); - $this->Application->Debugger->profileFinish('url_parsing'); - } - else - { - $this->processRewriteURL(); - } - - } break; case 'P': @@ -171,6 +157,21 @@ break; } } + + if( $this->Application->RewriteURLs() ) + { + if( $this->Application->isDebugMode() ) + { + $this->Application->Debugger->profileStart('url_parsing', 'Parsing MOD_REWRITE url'); + $this->processRewriteURL(); + $this->Application->Debugger->profileFinish('url_parsing'); + } + else + { + $this->processRewriteURL(); + } + + } } function convertFiles() @@ -390,11 +391,22 @@ } // match module - if($url_part) + $next_template = $this->Get('next_template'); + if($url_part || $next_template) { + if($next_template) + { + $next_template_parts = explode('/', $next_template); + $module_folder = array_shift($next_template_parts); + } + else + { + $module_folder = $url_part; + } + foreach ($this->Application->ModuleInfo as $module_name => $module_data) { - if( trim($module_data['TemplatePath'], '/') == $url_part ) + if( trim($module_data['TemplatePath'], '/') == $module_folder ) { $module_prefix = $module_data['Var']; break;