My Kohana 3 application utilizes a reasonable little bit of $_GET parameters. However, if I used the applying I acquired an empty page with only the written text "No input file specified". I rapidly found the reply to this apparently prevalent problem by altering during my .htaccess file:

RewriteRule .* index.php/$0 [PT,L]

to

RewriteRule .* index.php?$0 [PT,L]

However now my $_GET array has lost all of the parameters passed. Any page that does not require $_GET is working fine. I am much less good with .htaccess files, but from what I will tell, adding the ? has changed the $_GET array using the uri.

I have also attempted

RewriteRule .* index.php/?$0 [PT,L]

and

RewriteRule .* index.php?/$0 [PT,L]

but with no success.

Below is my .htaccess file entirely (mostly just like example.htaccess)

# Turn on URL rewriting
RewriteEngine On

# Installation directory
RewriteBase /

# 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 [F,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,L]

The nearest I have found to some solution was this publish: http://forum.kohanaframework.org/discussion/comment/4857/#Comment_4857 However that appears to become to have an older version of Kohana, and I am unsure how this could operate in Kohana v3.

Using QSA (Query String Append) should help:

RewriteRule .* index.php?$0 [PT,L, QSA]

I must make two changes towards the K03 example.htaccess to have it to operate:

RewriteRule ^(application|modules|system)/ - [F,L] rather than

RewriteRule ^(?:application|modules|system)\b - [F,L] (which provides an interior Server Error)

RewriteRule .* index.php [L] rather than

RewriteRule .* index.php/$0 [PT] (which provides a No input file specified message.)

Here's my .htaccess apply for K03:

# Turn on URL rewriting
RewriteEngine On

# Installation directory
#RewriteBase /

# Protect hidden files from being viewed

    Order Deny,Allow
    Deny From All

# Protect application and system files from being viewed
RewriteRule ^(application|modules|system)/ - [F,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 [L]