I have a project directory structure as below
| project
--| controllers
--| views
--| index.php
--| .htaccess
--| config
--| .htaccess
Here's my main .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)?$ views [L]
</IfModule>
and my view .htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.+$ index.php [L]
</IfModule>
I am able to redirect all my requests to views/index.php. When i go to www.example.com/project it will be redirected to www.example.com/project/views.
My main problem is i don't want to have views in my URL. If i go to www.example.com/project it should execute views/index.php but URL does not change. Can anyone help me to figure out this problem?