Problem with tutorial |
Hi all,
I am new and I try to learn by doing tutorial from here: http://www.codeigniter.com/user_guide/tutorial and I meet problem, which I am not able to solve it. I try to search here, but did not find it. I am in part, where I create form Code: <?php echo form_open('news/create') ?> Code: <form action="ci/news/create" method="post" accept-charset="utf-8"> Code: http://localhost/ci/news/ci/news/create Code: http://localhost/ci/ ...only one thing which I did differently in my project is, that I add rewrite condition to wipe out index.php from address, but even I add back, it does not work, it is same issue. My routes.php looks same as in tutorial also. In config.php I have PHP Code: $config['base_url'] = 'ci/'; Can somebody help me to understand, what is wrong? Thank you for each help in advance PeterB
Problem is in your usage of relative urls. Since you have CI in sub directory and links are relative to current url, it would nest deeper and deeper. If you are currently on page "http://localhost/ci/something" and link points to "ci/something2", browser tries to load "http://localhost/ci/something/ci/something2". If "http://localhost/ci/something/ci/something2" actually did exist and there was another link on this page pointing to "ci/something3", browser would try to load "http://localhost/ci/something/ci/something2/ci/something3".
Try to change base_url to absolute url PHP Code: $config['base_url'] = '/ci/'; |
Welcome Guest, Not a member yet? Register Sign In |