I am trying to post a form and I have the following routes inside my routes.php:
$route['install'] = 'install/index';
$route['ajax_install'] = 'install/ajax_install';
$route['success'] = 'install/success';
when i try to do the post it should call ajax_install.. however when i perform the ajax post request it shows the following
as you can see it calls siral.marketing/install/index.php/ajax_install
why is there an index.php in it? shouldn't it be siral.marketing/install/ajax_install
here is my nginx config:
server {
listen 80;
listen [::]:80;
root /var/www/smartpanel;
index index.php index.html index.htm;
server_name www.siral.marketing;
#return 301 http://siral.marketing$request_uri;
client_max_body_size 100M;
autoindex on;
location / {
try_files $uri $uri/ /index.php;
}
location ~* \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
# Deny for accessing codes
location ~ ^/(application|system|tests)/ {
return 403;
}
include snippets/phpmyadmin.conf;
}
I also already have:
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';
in my config file