I have a codeignter with 3 applications, inside each the default welcome view, the structure looks something like this:
-
www
-
applications
- site
- site2
- site3
- system
I need to figure out how to redirect to site2 for example from site 1
I have a codeignter with 3 applications, inside each the default welcome view, the structure looks something like this:
www
applications
I need to figure out how to redirect to site2 for example from site 1
Adriano,
One suggestion is to use the header
function, pointing to the URL of the application to be redirected:
header('Location: http://www.example.com/');
header('Location: https://pt.stackoverflow.com');
It's a simple, native PHP solution that allows you to redirect. For more information, the PHP documentation explains some more details.
Controller Site 1 to call site 2
public function redirecionar() {
redirect('nomecontrollersite2/indexsite2');
}
Controller Site 2
public function indexsite2() {
$this->load->view('indexsite2',);
}