Forum

Easier Kohana UrlToolkit rules

SaltwaterC
6 June 2010, 13:52
The howto says:
UrlToolkit {
ToolkitID = kohana
Match ^/(application|system) DenyAccess
RequestURI exists Return
Match ^/(.*) Rewrite /index.php/$1
}

VirtualHost {
...
TriggerOnCGIstatus = false
EnablePathInfo = yes
UseToolkit = kohana
}

Set $config['site_domain'] to '/' and $config['index_page'] to ''.

Well, a lot of these steps can be ironed out by using:
UrlToolkit {
ToolkitID = kohana
Match ^/(application|modules|system) DenyAccess
RequestURI exists Return
Match ^/(.*) Rewrite /index.php?kohana_uri=$1
}

Shorter as it doesn't require PATH_INFO. It also works with $config['site_domain'] = '/'. It includes 'modules' deny rule - also a part of the Kohana cascading file system.
Hugo Leisink
6 June 2010, 16:11
Thanks!
This topic has been closed.