Hello I have the following files structure:
/public_html(docroot)
- /public
/css
/js
index.php
- /application
- /library
Note: I cannot change this structure. What I want: all requests to files should open files from public folder, all other requests should go to the index.php. Currently I have the next .htaccess in public_html:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
But it works just with http://hostname/public. How can it work without public? Thanks.
I have found an answer: