C
C
Cyril2018-03-14 22:16:48
CodeIgniter
Cyril, 2018-03-14 22:16:48

How do I get my WordPress site and CodeIgniter app to work together?

Essence of a question following...
There is a certain domain.com domain . And also there is a site on WordPress , and there is a web application based on the CodeIgniter PHP framework . Moreover, the WordPress site has its own routing (routing) of requests, and the CodeIgniter application has its own.
The folder structure is:
/var/www/domain.com is a WordPress site.
/var/www/domain.com/web-app is a CodeIgniter application.
How to make it so that all URLs related to the WordPress site are processed by WordPress, and those URLs that are related to the CodeIgniter application are processed by the CodeIgniter application?
Let's say...
http://domain.com/how-to-make-tomato-paste/is one of the posts on the WordPress site.
http://domain.com/events/editMembers/3 is a call to the editMembers method on the Events controller for an event with an ID of 3.
Or domain.com/login is a login...
How to correctly write .htaccess to make the correct "redirect" all CodeIgniter requests to /var/www/domain.com/web-app/index.php , and WordPress requests to /var/www/domain.com/index.php ? The .htaccess file itself is in /var/www/domain.com .
I hope I explained the issue clearly.
As far as I understand, in .htaccess you need to specify URL requests to all existing controllers of the CodeIgniter application. And then all requests that match will be redirected to the CodeIgniter application. And those that do not match will be addressed to WordPress. But how to do it right?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question