05-10-2020, 12:22 AM
Hello guys i have 2 projects.
1 Front
1 Admin
i have 2 separate folders for each project so in first project i have this config
FRONT Base_url = http://example.com
ADMIN Base_url = http://example.com/admin
In admin i want to use a config to create links for the FRONT
So i am trying to use this site_url with the Alternate configuration File
But it gives me the same URL for the admin
http://example.com/admin/test
Expected result
http://example.com/test
I have this Config File
Maybe this is a bug ? Or i am using this alternate config file wrong ?
1 Front
1 Admin
i have 2 separate folders for each project so in first project i have this config
FRONT Base_url = http://example.com
ADMIN Base_url = http://example.com/admin
In admin i want to use a config to create links for the FRONT
So i am trying to use this site_url with the Alternate configuration File
PHP Code:
$config = new \Config\AppFront();
echo site_url('test',NULL, $config);
But it gives me the same URL for the admin
http://example.com/admin/test
Expected result
http://example.com/test
I have this Config File
PHP Code:
<?php namespace Config;
use CodeIgniter\Config\BaseConfig;
class FrontApp extends BaseConfig
{
public $baseURL = 'https://example.com/';
public $indexPage = '';
public $uriProtocol = 'REQUEST_URI';
}
Maybe this is a bug ? Or i am using this alternate config file wrong ?