I am working on a WordPress plugin for a schedule software that is built in Codeigniter framework. The front end is running fine within the WP page now with some WP functions, CSS, and headers and footers that I want. But when I try to log into the back end of the codeigniter application when it is hooked into wordpress, it acts like the codeigniter login credentials are wrong. If I edit out the following from my codeigniter index.php:
require('../wp-blog-header.php');
add_filter('site_url', 'ci_site_url', 1);
function ci_site_url() {
include(BASEPATH.'application/config/config.php');
return $config['base_url'];
}
header("HTTP/1.0 200 OK");
I can log into the backend view but the WP Headers and functions etc. are lost from the front end view.
I do NOT want want my Codigniter backend to be keyed to the WP login. They need to be separate.
How can I block the codeigniter login view from Wordpress hooks?
I have tried:
if( basename(__FILE__) !== '/application/views/user/login.php' ) {
require('../wp-blog-header.php');
add_filter('site_url', 'ci_site_url', 1);
function ci_site_url() {
include(BASEPATH.'application/config/config.php');
return $config['base_url'];
}
header("HTTP/1.0 200 OK");
}
This does not work
STRUCTURE
/WordPress/CodeIgniter/
WordPress has its own index.php (WordPress/index.php) Codeigniter has its own index.php (/WordPress/CodeIgniter/index.php) in which the above code is contained.
Both have their own htaccess file.
WordPress:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /WordPress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /portal/index.php [L]
</IfModule>
# END WordPress
Codeigniter
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Server location of the CodeIgniter view I want to block from WordPress Headers: /WordPress/CodeIgniter/application/views/user/login.php Controler /WordPress/CodeIgniter/application/controllers/user.php
Url location of the view/page I want to block is https://www.MyWebsite.com/WordPress/CodeIgniter/index.php/user/login
index.phpfile located and where is the CodeIgniterindex.phpfile located? What's inside yourhtaccessfile? etc, etc, etc.... - Sparky