
Rozwiązałem problem z trawersowaniem katalogów, przy pomocy pliku .htaccess (w folderze public usunąłem plik .htaccess, został tylko index.php), o takiej zawartości:
Kod
RewriteEngine On
RewriteBase /salonbiasov
RewriteCond %{REQUEST_FILENAME} !/public/ [NC]
RewriteRule ^(.*)$ /public/$1 [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^public/.*$ /public/index.php [NC,L]
RewriteBase /salonbiasov
RewriteCond %{REQUEST_FILENAME} !/public/ [NC]
RewriteRule ^(.*)$ /public/$1 [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^public/.*$ /public/index.php [NC,L]
Wszystko ładuje się OK, oprócz 1 akcji w kontrolerze IndexController:
<?php class IndexController extends Zend_Controller_Action { public function init() { $this->_helper->redirector->setUseAbsoluteUri(true); } public function indexAction() { //strona glówna } public function kontaktAction() { $tekst=new Zend_View(); $tekst->setScriptPath(APPLICATION_PATH . '/views/scripts/adminstatic/'); $this->view->tekst=$tekst->render('kontakt.phtml'); } public function wspolpracaAction() { $model = new Application_Model_DbTable_Wspolpraca(); $this->view->dane = $model->getAll(); $this->view->path = '..'.DIRECTORY_SEPARATOR.'public'.DIRECTORY_SEPARATOR.'images' .DIRECTORY_SEPARATOR.'upload'.DIRECTORY_SEPARATOR.'wspolpraca' .DIRECTORY_SEPARATOR; } public function ofirmieAction() { $tekst=new Zend_View(); $tekst->setScriptPath(APPLICATION_PATH . '/views/scripts/adminstatic/'); $this->view->tekst=$tekst->render('ofirmie.phtml'); } public function promocjeAction() { $model = new Application_Model_DbTable_News(); $this->view->dane = $model->getAllNews(); $this->view->path = '..'.DIRECTORY_SEPARATOR.'public'.DIRECTORY_SEPARATOR.'images' .DIRECTORY_SEPARATOR.'upload'.DIRECTORY_SEPARATOR.'news' .DIRECTORY_SEPARATOR; } public function showitemAction() { $model = new Application_Model_DbTable_Item(); $id = $this->_getParam('id',1); $this->view->dane = $model->getItemByCategory($id); $this->view->path = '..'.DIRECTORY_SEPARATOR.'public'.DIRECTORY_SEPARATOR.'images' .DIRECTORY_SEPARATOR.'upload'.DIRECTORY_SEPARATOR.'items' .DIRECTORY_SEPARATOR; } }
Widok dla akcji showitemAction()
<h1>BRAK ASORTYMENTU</h1> <? endif ?> <? foreach($this->dane as $k=>$v):?> <div class="item"> <img src="<?=$this->thumb($this->path . $v['img'], 175, 175);?>" /> <span class="name"><?=$v['nazwa'];?></span><br /> <span class="price"><?=$v['cena'];?> zł</span> </div> <? endforeach ?>
problem jest z akcją showitemAction(), uruchomienie jej powoduje:
Kod
500 Internal Error
The server encountered an internal error and could not complete your request.
The server encountered an internal error and could not complete your request.
ale tylko na serwerze home.pl na localhoscie wszystko jest OK

Na początku myślałem, że to problem z routerem, więc tak rozpisałem trasy w bootstrappie:
$router->addRoute('produkty7', 'controller'=>'index', 'action'=>'showitem', 'id'=>7, ))); $router->addRoute('produkty8', 'controller'=>'index', 'action'=>'showitem', 'id'=>8, ))); $router->addRoute('produkty9', 'controller'=>'index', 'action'=>'showitem', 'id'=>9, )));
Czy ktoś może mi pomóc odnośnie tego problemu

