urls / image urls |
[eluser]MWebber[/eluser]
Hi, I'm new to CodeIgniter. I have strange problem with the links. example : i go to Register controller and i press in the menu link to Login controller it's redirects me to http://example.com/register/login. what can i do for the url it to send me to http://example.com/login and http://example.com/register (without site_url() if its possible ). Same for the images - in register controller they load normally but in login controller they point to http://example.com/register/login/images... images dir is in root dir. All help is appreciated
[eluser]Razedd[/eluser]
go to system/application/config/config.php There you can set the base url. That should do it i think Greetings, Razedd
[eluser]Mr. Pickle[/eluser]
You can autoload the url helper and use Code: <?php
[eluser]Razedd[/eluser]
[quote author="Razedd" date="1284129083"]go to system/application/config/config.php [/quote] As i said go to config.php and change the: Code: $config['base_url'] = "http://example.com/"; to youre own url, for me that is this Code: /*
[eluser]MWebber[/eluser]
Thank you all for the help i found my solution here http://ellislab.com/forums/viewthread/66887/#329207 Code: <base href="<?php echo $this->config->item('base_url') ?>www/" /> this row configures all paths in the template and works perfectly P.S Thanks Razedd and Mr. Pickle this solutions helped me too |
Welcome Guest, Not a member yet? Register Sign In |