(12-05-2015, 12:30 AM)andymike Wrote: Hi,
Currently, i have kohana framework and codeigniter website. Can anyone help or show me a way to integrate Kohana script into codeigniter script?
Or maybe using kohana website as subfold (subdomain) that at least make kohana user login same as codeigniter meaning when user logs in from codeigniter website, it is automatically login in kohana website.
Thank you so much for your help
I can't give you very specific advice, but in many websites I have worked on, I have had more than one application handle requests. The requests will by default route to one application, but other specific routes are routed to the other app by using Apache mod_rewrite. For example:
Code:
Options -Indexes
RewriteEngine On
RewriteBase /
# URLs routed to CodeIgniter
RewriteRule ^auth(.*)$ /ci_index.php [L]
RewriteRule ^forms(.*)$ /ci_index.php [L]
RewriteRule ^login$ /ci_index.php [L]
RewriteRule ^logout$ /ci_index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
In this example, all requests are routed to WordPress unless they are auth, forms, login, or logout. Notice that I have renamed CI's index.php file to ci_index.php.
Both CI and Wordpress are sharing the same database, so I can use WordPress to create content that is pulled into CI.
With some creative planing, I'm sure you can figure out how to make something similar work for you.