It should. However, you should also look into your .htaccess file again. did you set a proper RewriteBase (i.e., RewriteBase /subdir)?
Best regards Tobias 2008/2/4, Łukasz Kazimierz Bandzarewicz <[EMAIL PROTECTED]>: > > I read ZF manual very carefully and I've found: > 7.4.2.2. Base Url and Subdirectories > > Zend_Controller_Request_Http allows Zend_Controller_Router_Rewrite to be > used in subdirectories. Zend_Controller_Request_Http will attempt to > automatically detect your base URL and set it accordingly. > > For example, if you keep your index.php in a webserver subdirectory named > /projects/myapp/index.php, base URL (rewrite base) should be set to > /projects/myapp. This string will then be stripped from the beginning of > the path before calculating any route matches. This frees one from the > necessity of prepending it to any of your routes. A route of > 'user/:username' will match URIs like > http://localhost/projects/myapp/user/martel and > http://example.com/user/martel. > On my localhost machine baseUrl is: localhost/my_site/www > On the server: production_site.com/subdir > > Now I don't have time for test it, but I think > $controller->setBaseUrl('...') will solve this problem, wouldn't it? > > regards, > Łukasz > > On 04/02/2008, Tobias Gies <[EMAIL PROTECTED]> wrote: > > > > you will then have to ask the server admin. my crystal ball is broken > > :-( > > > > 2008/2/4, Łukasz Kazimierz Bandzarewicz <[EMAIL PROTECTED]>: > > > > > > Unfortunately I don't have access to error.log > > > > > > On 04/02/2008, Tobias Gies <[EMAIL PROTECTED]> wrote: > > > > > > > > what is the entry in the apache error.log? > > > > > > > > 2008/2/4, Łukasz Kazimierz Bandzarewicz <[EMAIL PROTECTED]>: > > > > > > > > > > Without mod_rewrite you can't execute ZF application. > > > > > I forgot mention that, if I change redirect code to: > > > > > > > > > > if (isset($_SERVER['HTTP_REFERER'])) { > > > > > $previousUrl = $_SERVER['HTTP_REFERER']; > > > > > } > > > > > else { > > > > > $previousUrl = BASE_URL; > > > > > } > > > > > $this->_redirect($previousUrl); > > > > > > > > > > script works on both servers. > > > > > Any ideas? > > > > > > > > > > On 04/02/2008, Tobias Gies <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > most likely the problem is that mod_rewrite is not enabled on > > > > > > the production server. enable it (or make your admin do it) and you > > > > > > should > > > > > > be good to go. > > > > > > > > > > > > Best regards, > > > > > > Tobias > > > > > > > > > > > > 2008/2/4, Łukasz Kazimierz Bandzarewicz <[EMAIL PROTECTED]>: > > > > > > > > > > > > > > Hi. > > > > > > > > > > > > > > It wont be a pure Zend Framewerok issue. > > > > > > > I have problem with apache's 500 Internal Error on several > > > > > > > production servers. > > > > > > > > > > > > > > For example. > > > > > > > This code works on my localhost machine but on production > > > > > > > server it rises 500 Internal Error: > > > > > > > > > > > > > > // SomeController.php > > > > > > > function doSomethingAction() { > > > > > > > $this->_redirector->gotoRouteAndExit(array('id' => > > > > > > > $quiz_id), 'quiz_info'); > > > > > > > } > > > > > > > > > > > > > > // SomeRouters.php > > > > > > > $route = new Zend_Controller_Router_Route( > > > > > > > 'quiz/info/:id', > > > > > > > array( > > > > > > > 'module' => 'index', > > > > > > > 'controller' => 'quiz', > > > > > > > 'action' => 'show' > > > > > > > ) > > > > > > > ); > > > > > > > $router->addRoute('quiz_info', $route); > > > > > > > > > > > > > > During several experiments I've figured out that it produces > > > > > > > some infinite loop (something like redirections chain). > > > > > > > > > > > > > > On both machines I have standard .htaccess file: > > > > > > > > > > > > > > RewriteEngine on > > > > > > > RewriteRule !\.(js|ico|gif|jpg|png|swf|css|html)$ index.php > > > > > > > > > > > > > > Where is the bug? > > > > > > > > > > > > > > Thanks for help, > > > > > > > Łukasz > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
