22Oca/120
Kohana Framework’te adresten index.php silme
Kohana Framework'te adresler, www.example.com/index.php/controller/action şeklinde olmakta. Adresten index.php'yi kaldırmak için aşağıdaki .htaccess dosyasını root dizininde oluşturmanız yeterlidir.
# Remove index.php from url
# Turn on URL rewriting
RewriteEngine On
# Put your installation directory here:
# If your URL is www.example.com/kohana/, use /kohana/
# If your URL is www.example.com/, use /
RewriteBase /
RewriteRule ^(?:application|modules|system)\b - [F,L]
RewriteRule ^(application|modules|system)/ - [F,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php [PT,L]