• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Link buttons not working

I followed the tutorial. 
I have done all the tasks up to this page.
For some reason when I try to submit this simple form the framework try to redirect me to this address:, and this address not exist of course.
I added some record to my empty DB just to check if the other pages is working well and to test the links in the 'news' page.
When I try to press on one of the View_article links its also redirect me to the same strange address, for example.

When I inspect the web page code generated by the framework I can see that 
<?php echo site_url('news/'.$news_item['slug']); ?>

is translated to the previous address, for example, So for some reason the site_url method generate this address.


Probably due to the value assigned to $config['base_url'] in application/config/config.php
Read the comments in the file carefully and follow the directions.


What's your development stack? Are you using the most current version of CI? Is your code exactly like the tutorial code?

Hi thank. It really was the config.php file.
I set the 'base_url' in the config.php file to my server ip (If someone is reading this thread in the future make sure you not forget the http:// prefix and the / suffix).
I also set the index page to the right value (empty string in my case because my server start file is set to index.php).

Now everything is working and I can continue with the tutorial.

Thank you very much guys!

This is basic CodeIgniter setup in the Users Guide.

You always set the base url in the config file to your site.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.