I designed a site using Wordpress, and have been trying to get a Codeigniter form app integrated with it, with all the corresponding URLs.
I put the CI app in the root folder of the Wordpress site. The folder is named "Chile" (it's a series of forms separated by LATAM countries). I changed the .htaccess file to include /chile where necessary. I also added:
require '../wp-load.php';
to the CI index.php file.
I can now load some of the essential urls in the CI app, but they don't seem to be routed properly.
the base url is set to:
$config['base_url'] = "http://".$_SERVER['HTTP_HOST'];
$config['base_url'] .= preg_replace('@/+$@', '', dirname($_SERVER['SCRIPT_NAME'])).'/';
the site is www.dermusikplatz.com. the form is located under www.dermusikplatz.com/chile/applications which i can reach by manually entering that. but when i try to submit the form, the url appears strangely as www.dermusikplatz.comapplications/save. In general, the urls constructed by the controllers and views just don't seem to be set up properly.
I've looked up the documentation regarding routing and have tried creating a $route rule. but i'm not sure what to route from and to what exactly. I've also seen various threads that suggest using MY_URL_helper to change the value of 'site_url' to 'ci_site_url', to avoid any redundancies between the value that Wordpress and CI have for that, but i'm not sure where to even start with that, even after checking out the helper documentation.
I've also tried going in and changing each path value in statements like these from:
$this->load->view('applications/form');
to:
$this->load->view('/chile/applications/form');
but I understand that makes little sense as that directory doesn't exist. I assumed that changing the .htaccess file and the base_url would cover it, but there seems to be much more to it than that.
I'm a little lost here, and not super familiar with Codeigniter.
If anyone can help set me in the right direction at the very least, I would really appreciate it. Thanks.