php - Problems with Multiple Applications Setup in Codeigniter 3

631

I know this question has been asked numerous times but couldn't find the definitive solution to what I am trying to do.

I am trying to serve multiple apps using single codeigniter 3 installation simultaneously. Specially frontend, backend and other vendor specific interface. This is required because each app has its own login and need to maintain its unique session.

I have gone through codeigniter 3 manual

https://www.codeigniter.com/userguide3/general/managing_apps.html#running-multiple-applications-with-one-codeigniter-installation

I have setup my app this way as suggeted

appfrontend
appbackend

As suggested, I have two index files which routes to each application.

index.php -> appfrontend
admin.php -> appbackend

As suggested in documentation https://www.codeigniter.com/userguide3/general/urls.html#removing-the-index-php-file

My ".htaccess" file have

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

This removes the index.php for frontend and that's fine.

Question: How to remove admin.php as well from the URL?

People are also looking for solutions to the problem: php - Processing large amount of data in Laravel 5

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.