URL redirect not working properly |
[eluser]Unknown[/eluser]
Hi, Let's say I have a url: www.my-site.com/index.php/admin I have a simple form which on submit should go to 'clients/add'. Instead I get something like this: www.my-site.com/index.php/admin/www.my-site.com/index.php/clients/add I am sure it's a simple amateur problem, but still a problem... Could somebody tell me: 1. why is this request handled this way. 2. how can i fix it. Thanks! | Sebastian.
[eluser]ejangi[/eluser]
in your /application/config/config.php file you need to fill in the: Code: $config['base_url'] = 'http://www.mysite.com/'; But, I think you're main problem is just that you're not putting the 'http://' at the start of your link. Either do a link as: Code: <a href="http://www.mysite.com/whatever">Whatever</a> Code: <?php echo anchor('clients/add', 'Add a new client'); ?>
[eluser]Unknown[/eluser]
ucantblamem : Thanks, I had $config['base_url'] = 'www.mysite.com/' instead of $config['base_url'] = 'http://www.mysite.com/'; That did the trick, C u around! | Sebastian. |
Welcome Guest, Not a member yet? Register Sign In |