There are 2 steps:
1 .You have to add this code to your
bootstrap.phpKohana::init(array(
'base_url' => '/myapp/',
'index_file' => FALSE,
));
2. Change your
.htaccess file into this:# Turn on URL rewriting RewriteEngine On # Installation directory RewriteBase /kohana/ # Allow these directories and files to be displayed directly: # - index.php (DO NOT FORGET THIS!) # - robots.txt # - favicon.ico # - Any file inside of the media/ directory RewriteRule ^(index\.php|robots\.txt|favicon\.ico|media|uploads) - [PT,L] # Rewrite all other URLs to index.php/URL RewriteRule .* index.php?/$0 [PT,L,QSA]See this thread for details.
Actually you have to put your
media files (like js, img or css) in main directory, the same where your application and system lives.Do not forget to check if
mod_rewrite is enabled.
