title: what should be the necessary 'routes setting' to successfully request a specific controller for ajax request in codeigniter?
body: <p><strong>shows error 404 page not found, when send ajax request</strong>
  <br>
  Here is my codeigniter's routes file.
  <br>
  <br>
  <strong>routes.php</strong>
  <br></p>
  
  <pre><code>$route['request_handler/search_service'] = 'Request_handler/search_service';
  $route['(:any)'] = 'pages/view/$1';
  $route['default_controller'] = 'pages/view';
  
  $route['404_override'] = '';
  $route['translate_uri_dashes'] = FALSE;
  </code></pre>
  
  <p><br>
  Here is my jquery code for ajax request to a <b>Request_handler</b> controller
  <br>
  <br>
  <strong>script.js</strong></p>
  
  <pre><code>$(document).ready(function(){
    $('#search_service').on('keyup', function(){
      var request_url = "&lt;?php echo base_url('request_handler/search_service');?&gt;";
      var ss = $('#search_service').val();
      if (ss != '') {
        $.ajax({
          url:request_url,
          method:"POST",
          data: {search:ss},
          dataType:"text",
          success:function(data){
            $('#search_result').html(data);
          } 
        });
      }
    });
  });
  </code></pre>
  
  <p><br>
  And this is my controller code<br><br>
  <strong>Request_handler.php</strong>
  <br></p>
  
  <pre><code>class Request_handler extends CI_Controller {
  
  function __construct() {
      parent::__construct();
      $this-&gt;load-&gt;database();
  }
  
  public function search_service() {
      $this-&gt;load-&gt;model('Model_request_handler');
      $ss = $this-&gt;input-&gt;post('search');
      return $this-&gt;Model_request_handler-&gt;search_services($ss);
  }
  }
  </code></pre>
  
  <p><br>
  I need to figure out why I am getting 404-Page Not Found error on ajax requests. Thanks in advance. </p>