title: ajax jquery with codeigniter. url doesnt access controller
body: <p>I am new to codeigniter and cannot get my ajax to work.<br>
  I am trying to make links load content into the main document on click.<br>
  I looked for instructions but could not figure it out. All works except the ajax returns <code>alert('ERROR')</code> message. nothing is loadded into <code>&lt;div id='load_here'&gt;&lt;/div&gt;</code><br>
  Maybe I am missing something in config.php? Do i have to load some library for this to work? 
  Any ideas would be helpfull
  //main document link</p>
  
  <pre><code>&lt;span id='reg_link_rules'&gt;Link&lt;/span&gt;  
  &lt;div id='load_here'&gt;&lt;/div&gt;
  </code></pre>
  
  <p>// controller</p>
  
  <pre><code>class Register extends CI_Controller {
     public function hello()
     {
        echo 'hello';
     }
  }
  </code></pre>
  
  <p>// jQuery</p>
  
  <pre><code>$(document).ready(function() {
      $('#reg_link_rules').click(function(eve){
  
      $.ajax({
        type: "GET", 
        url: "register/hello", 
  
        complete: function(data){
          $('#load_here').html(data);
      },
      error: function(){alert('error');}
      });
    });
  });
  </code></pre>
  
  <p>I think the problem is that the ajax url does not access the controller. 
  Z:/home/codeigniter/www/register/test    this is where i think it takes me</p>
  
  <p>problem solved, the url needed to be <a href="http://codeigniter/index.php/register/hello" rel="noreferrer">http://codeigniter/index.php/register/hello</a></p>