【发布时间】:2023-03-06 16:45:02
【问题描述】:
我有 bootstrap.php:
Kohana::init(array(
'base_url' => '/wypoczynek/',
'index_file' => false,
));
Route::set('default', '(<controller>(/<action>(/<id>)))')
->defaults(array(
'controller' => 'home',
'action' => 'index',
));
Route::set('dodaj-obiekt', 'dodaj-obiekt(/<action>(/<id>))')
->defaults(array(
'controller' => 'object',
'action' => 'addObject',
));
还有.htaccess:
RewriteEngine On
RewriteBase /wypoczynek/
<Files .*>
Order Deny,Allow
Deny From All
</Files>
RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT]
链接:http://domain.pl/wypoczynek 工作正常,但 http://domain.pl/wypoczynek/dodaj-obiekt 不工作。我看到 404 错误页面,Apache 的默认 404 错误页面。怎么了?
【问题讨论】: