Just what Phun explained but the tutorial,
ACP > System Settings > Search Engine Optimization, Find Friendly URL Features and change your settings to these ones, , then add a file in your root FTP and call it .htaccess, once created the file add the following into that file
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .(jpeg|jpg|gif|png)$ /public/404.php [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>