Answering my own question. It's a proper solution but not for XAMPP users.
Edit your /httpd.conf file using sudo nano ../../private/etc/apache2/httpd.conf and change all occurrence of
AllowOverride None
to
AllowOverride All
Also find this line
#LoadModule rewrite_module modules/mod_rewrite.so
and uncomment it.
LoadModule rewrite_module modules/mod_rewrite.so
My .htaccess in /Project directory. Not in /application
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
And edit your Codeigniter's project config.php file.
Project/application/config/config.php and set
$config['sess_save_path'] = '/tmp';
Because while running this project through System's Apache it'll throw an error of session directory. By default, its value is NULL so don't forget to edit it. Your base_url should be
$config['base_url'] = 'http://localhost:8080';
You can use whatever port is free. This all must fix your index.php issue.
Now configure your Mysqli db or whatever. You can use localhost/phpmyadmin for the DB but it'll make you dependent on Xampp. To overcome this, install Mysql library & MysqlWorkbench application. Start your mysql server using mysql.server start. Configure your database.php file and run your project using this command.
php -S localhost:8080
Run this command into your project directory. And yes it's better to move out your project from /htdocs to some other directory. (Out of xampp)