If you want to rewrite URLs with joomla, than you need to activate the mod_rewrite from the administrator panel.
- login to the back-end joomla
- go to the Global Configuration settings
- in the Site tab, in the right side of the scree, activate the mod_rewrite option
- login to your FTP account and find in the joomla installation folder the htaccess.txt file
- rename the htaccess.txt -> .htaccess
Note: you also need to activate the SEF URLs on joomla.