URLs are working fine in my application. I mean they are pretty URLs. Like http://www.example.com/ But it also works when you access the page with index.php like http://www.example.com/index.php, which I don't want because it is showing two links in sitemap for one page. One page without index.php and another with index.php. Demonstration of the sitemap is here https://www.xml-sitemaps.com/details-eln.6762418.html
Here is the .htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>