Нужно сделать так, что бы при всех запросах юзер попадал на index.php
и только в одном случае - когда запрос начинается с /public/ юзер попадал в эту самую /public/
В общем, нужно что то вроде:
/students/test/a=5&b=6 => index.php?controller=students&action=test&a=5&b=6
/students/test => index.php?controller=students&action=test
НО
/public/css/basic.css => /public/css/basic.css
/public/images/1.jpg => /public/images/1.jpg
Что то вроде такого
RewriteCond %{REQUEST_URI} ^(/public/)(.*)$
RewriteRule ^(/public/)(.*)$ $1$2
RewriteCond %{REQUEST_URI} ^(.*)/(.*)/(.*)$
RewriteRule ^(.*)/(.*)/(.*)$ index.php?controller=$1&action=$2&$3 [QSA,L]
Вправьте мне мозг, плз..
>;0)