Witam!

Piszę ponieważ zarządzanie plikiem .htaccess mnie przerasta i nigdy nie byłem w stanie nauczyć się logiki działania tego ustrojstwa.
Ale do rzeczy. Modyfikuję oryginalny .htaccess Kohany. Potrzebuję go przerobić tak by przekierowywał wszystkie żadania do istniejących plików w folderze /application/public, resztę normalnie do index.php

Według przykładu:

http://sth/plik.jpg --> /application/public/plik.jpg lub jeśli nie istnieje to /index.php

Próbowałem rozwiązać to tak:
  1. # Turn on URL rewriting
  2. RewriteEngine On
  3.  
  4. # Installation directory
  5. RewriteBase /
  6.  
  7. # Protect hidden files from being viewed
  8. <Files .*>
  9. Order Deny,Allow
  10. Deny From All
  11. </Files>
  12.  
  13. # Protect application and system files from being viewed
  14. RewriteRule ^(?:application|kohana)\b.* index.php/$0 [L]
  15.  
  16. # Allow any files or directories that exist to be displayed directly
  17. RewriteCond %{REQUEST_FILENAME} !-f
  18. RewriteCond %{REQUEST_FILENAME} !-d
  19. RewriteRule .* application/public/$0 [PT]
  20. # Rewrite all other URLs to index.php/URL
  21. RewriteRule .* index.php/$0 [PT]


Rozwiązanie to jednak nie działa.
Proszę o pomoc smile.gif
Pozdrawiam.