All of my URLs on my Magento installation require index.php in them, like:
http://example.com/index.php/admin/
http://example.com/index.php/customer/account/
Mainly If you are using Linux Based system Like 'Ubuntu' and this is only suggested for localhost user not for the server.
Follow all the steps mentioned in the previous answers. +
Check in Apache configuration for it. (AllowOverride All) If AllowOverride value is none then change it to All and restart apache again.
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
Let me know if this step help anyone. As it can save you time if you find it earlier.
I am adding the exact lines from my htaccess file in localhost. for your reference
Around line number 110
############################################
## enable rewrites
Options +FollowSymLinks
RewriteEngine on
############################################
## you can put here your magento root folder
## path relative to web root
#RewriteBase /
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Images are for some user who understand easily from image the from the text: