我不确定这是否可能,但我需要的是加载默认值controller
,action
如果controller
没有从 中找到指定的url
,那么假设我是否有这个 url:
http://mywebsite.com/john
它必须调用user
控制器和selected_user
动作,
如果我有网址http://mywebsite.com/pages/profile
它必须调用pages
控制器和profile
动作,因为两者都已指定并找到
有没有办法做到这一点?
我在用Kohana 3.2
编辑这是我的 htaccess:
# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase /ep/
# Protect hidden files from being viewed
<Files .*>
Order Deny,Allow
Deny From All
</Files>
# Protect application and system files from being viewed
RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT]
/ep
我的目录是否htdocs
也在'base_url' => '/ep/',
我的目录bootstrap
中