Previous

Next

CssMySite

From 0 to 4000 in one day

21 Jul, 2010

labels:

Wow! +1 for Kohana and scalability.

My old, abandoned, learning-kohana website had 0 visitors yesterday - today: over 4000.

Y'all have really screwed up my google analytics. As I fade back in to obscurity my normal 1-3 visitors will look like nothing on a graph with 4000.

This site is written in Kohana 2.3.4. I have since moved on to Kohana 3.0 - a super-cool php framework. It rocks. Check it out. http://kohanaframework.org/

Kohana v3.0 .htaccess

30 Sep, 2009

labels:

The .htaccess file that work with my webhost for Kohana version 3.0


# 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]

The differences from the example.htaccess from the Kohana v3.0 download are:

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

instead of

RewriteRule ^(?:application|modules|system)\b - [F,L]

which gives an Internal Server Error and

RewriteRule .* index.php [L]

instead of

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

which gives a No input file specified message.

'No input file specified Error ' with Kohana and .htaccess

30 Jan, 2009

labels:

After installing Kohana v2.3 and following these instructions to remove index.php from the URL, a blank page with "No input file specified." is displayed.

The problem is some web hosting companies run PHP5 on Apache 2.2 as CGI mode as the default. If they do, Apache is not going to support 'PATH_INFO' inside Kohana. I found my information here although I had to rework the RewriteRule for Kohana 2.3.

To fix this, for Kohana 2.2.1 and earlier replace the last line in the .htaccess file with

RewriteRule ^(.+)$ index.php?/$1 [L]

Later versions need to use

RewriteRule ^(.+)$ index.php?kohana_uri=$1 [L]

For Kohana version 3.0 see my other post