CodeIgniter Forums
Customizing View URL - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Customizing View URL (/showthread.php?tid=17025)



Customizing View URL - El Forum - 03-23-2009

[eluser]Jaymey[/eluser]
I have set up a htaccess so that:

http://mydomain.com/dev/index.php/object
goes to
http://mydomain.com/dev/object

My problem, is that within that object I pull in a view like so:
$this->load->view('login');

It then displays the url as:

http://u-snap.com.au/dev/index.php/access/login

Whereas I'd prefer

http://u-snap.com.au/dev/access/login

Is this possible?


Customizing View URL - El Forum - 03-23-2009

[eluser]jedd[/eluser]
Hi Jaymey and welcome to the forums.

You need to modify your config/config.php file, around line 28 there'll be something that needs to look like this:

Code:
$config['index_page'] = "";



Customizing View URL - El Forum - 03-23-2009

[eluser]Jaymey[/eluser]
Hi Jedd,

Thanks for the welcome and the help. That worked a treat!

I'm really excited about CodeIgnitor.... it nearly seems to good to be true Smile