I have a Codeigniter-based system with two apps in it, app and site, which share a single system folder. The former has the backend, latter has the front-end. Because of this, index.php defaults to site and there is a separate app.php
to access the backend.
http://localhost/subdirectory/
goes to the frontend, while to access the backend I have to write http://localhost/subdirectory/app.php
.
I have referred to the User Guide on how to remove the index.php thing, and it works on the frontend. Say, http://localhost/subdirectory/pages/about
successfully goes to the site folder's pages class with an argument of about.
The issue is when I try to access the login page, the URI points to http://localhost/subdirectory/app.php/auth/login
. Entering http://localhost/subdirectory/app/auth/login
returns the 403 Forbidden page, which I presume to be the index.html on the folder UPDATE: discovered that it's due to the .htaccess present on app.
How can I remove the app.php part?
Here's my application structure:
app
| - cache, config, controllers, views, and other related CI folders
site
| - cache, config, etc, like app
system
| - CI's system folder
app.php
index.php
.htaccess
And here's my current .htaccess:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(app)/(.*)$ app.php/$1 [NC,L]
RewriteRule ^(.*)$ index.php/$1 [NC,L]
That doesn't work.
Any help? Thank you!
UPDATE: 403 Forbidden the shows up is caused by .htaccess with a content of "Deny from All", not only because of index.html. I don't know if this helps.