RewriteEngine On RewriteCond $1 !^(theindex\.php|public|images|js|css|robots\.txt|favicon\.ico) RewriteRule ^(.*)$ theindex.php/$1 [L,QSA]