I am using the .ajax function for an ajax call in codeigniter , my controller is called control and i have a function in it called Login

but when i'm running this code :

```
 $.ajax({
        url: "Connection/Login",
        type: "POST",
        data: Login_data,
        success: function () {
            alert('ajax worked');
        }

    });

```

the console gives me the 404 not found error.
And adding index.php does not work.

EDIT : i'm able to acces my function in my controller without mentioning the controller at all, so i can call url : "login" , i don't need to add the controller called connection ?

is this because of my route file? because i need that route file for an organized url and i cannot acces another controller function but the controller setup as default controller

route file :

> 
> $default\_controller = "Webpages"; $controller\_exceptions =
>  array('admin','forums');
> 
> 
> $route['default\_controller'] = $default\_controller;
>  $route["^((?!\b".implode('\b|\b', $controller\_exceptions)."\b).\*)$"] =
>  $default\_controller.'/$1'; $route['404\_override'] = '';
>  $route['translate\_uri\_dashes'] = FALSE;
> 
> 
>