toggle menu

Codeigniter and Wordpress integration routing issue on LEMP SERVER

Singh Atendra |24 May at 01:05

My project's requirement is to integrate codeigniter and wordpress. Codeigniter files are in root directory of wordpress. Everything is working fine in wordpress but when i access the codeigniter pages it redirect me on wordpress's page not found page. My site is running on LEMP server. i searched regarding it on google , there were some solutions so i tried them but nothing worked in my case. Please help. I thank you in advance.

  • 1 like
  • 1 comment

Dhananjay Kumar26 May at 11:05

I was getting the same issues with LEMP server cause there, not .htaccess file working.
Due to this reason Codeigniter files path "https://abc.com/xyz/" is followed WordPress URL.
I have done the following below script in /etc/nginx/sites-enabled/default file:

location /xyz {
try_files $uri $uri/ /xyz/index.php?$args;
}
location /test {
try_files $uri $uri/ /test/index.php?$args;
}

Added above multiple "location" path which using in CodeIgniter. And its working fine for me.
Please once try above, hope you getting the solution.

Posted:

24 May at 01:05

Viewed:

1309 times

Active:

26 May at 11:05