I\'m trying to set some htaccess rules for a specific Kohana controller. Basically its to do with form uploads. The majority of the site doesn\'t want to allow for large upl
What @LazyOne suggested is fairly easy to accomplish actually.
Consider this folder structure (only listing the most important files/folders):
application/
bootstrap.php
lib/
kohana-3.0.8/
modules/
system/
public_html/ <----- this is your DOCUMENT_ROOT
.htaccess
index.php
And consider you're using default Kohana's .htaccess:
RewriteEngine On
RewriteBase /
Order Deny,Allow
Deny From All
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT]
upload/
folder in your public_html/
. .htaccess
and index.php
from your DOCUMENT_ROOT to the upload/
folder. Edit your upload/.htaccess
: (only new changed lines displayed)
php_flag max_input_time 86400
php_value post_max_size 1536M
php_value upload_max_filesize 1024M
RewriteEngine On
RewriteBase /upload/
...
RewriteRule .* index.php/upload/$0 [PT]
Edit your upload/index.php
and update all paths ($application, $modules, $system).
You can download the whole tested package
Create an upload controller.
Additionally you could split index.php into two parts (cut after defining the paths) so you don't duplicate the whole file.
Setup like this worked just well for me and you can download my test application from here: http://d.pr/ioYk