![]() |
Codeigniter alongisde Wordpress, both of them on subfolders - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Codeigniter alongisde Wordpress, both of them on subfolders (/showthread.php?tid=92651) |
Codeigniter alongisde Wordpress, both of them on subfolders - starfire2k2 - 03-23-2025 Hello, I am trying to install CI4 alongside WordPress, each of them in an own subfolder. WordPress should be accessible directly via the main domain (www.example.com) CodeIgniter should be accessible via www.example.com/codeigniter. For the future, I would like to have multiple instances of CodeIgniter each on its own folder. The structure of CodeIgniter has not been changed My current folder structure looks like this: Code: /httpdocs/ The .htaccess under httpdocs (created by ChatGPT) looks like this: Code: RewriteEngine On .htaccess under www.example.com/codeigniter: Code: <IfModule mod_rewrite.c> .htaccess under www.example.com/codeigniter/public: Code: # Disable directory browsing BTW: the base_url has been set to 'http://www.example.com/codeigniter/' The problem I am facing is that CodeIgniter uses relative links (e.g. <a href="/about">) that now point to www.example.com/about instead of www.example.com/codeigniter/about The only solution I have found for me is to use base_url() on each link and form actions. Is there any other solution to this? |