CodeIgniter Forums
basic URL routing - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forum-22.html)
+--- Thread: basic URL routing (/thread-39140.html)



basic URL routing - El Forum - 03-02-2011

[eluser]RaiNnTeaRs[/eluser]
Hi all,

I have already forgot, about how the CodeIgniter works

as long as I remember, CodeIgniter didn't allow direct url link, such as :
'www.abc.com/applications/controllers/welcome.php'

So, what I would like to ask is :

If I have welcome_message.php ( View type in MVC )
and there are 5 links insides ..

How can I redirect them ? Thx


basic URL routing - El Forum - 03-02-2011

[eluser]DjLeChuck[/eluser]
Hi RaiNnTeaRs,

Just like that :
Code:
<?php
// Use base_url() if you want an absolute URL
// Then after index.php (required if you did'nt use an .htaccess)
//     use the controller name and the function name
$my_link = base_url().'index.php/members/edit/';
?>



basic URL routing - El Forum - 03-03-2011

[eluser]RaiNnTeaRs[/eluser]
Ah i c.. thx,my mistake is because I thought because I've changed the controller's filename , I ought to change how to call them too..

Thx bro


basic URL routing - El Forum - 03-03-2011

[eluser]DjLeChuck[/eluser]
You're welcome. ;-)


basic URL routing - El Forum - 03-04-2011

[eluser]KarlBallard[/eluser]
I'd personally recommend site_url()...