This is a slight variation on the standard 'how to remove index.php from magento url' question.
I've implemented the changes mentioned in this answer and the urls generated on the site no longer show the index.php.
However, taking it a step further, old links to the site with index.php still in the url are still valid.
e.g. www.mydomain.com/index.php/page1 is mentioned somewhere online and user follows the link to the site. Instead of redirecting to www.mydomain.com/page1 it remains as it was and is still picked up in our analytics as a separate url.
I'm not familiar with the LAMP environment (still on the learning curve!), so I'm not used to mod_rewrite rules. Any help you can offer in educating me on how to structure the rule so that it strips the index.php from the url and 301 redirects to the remainder would be appreciated!
thanks!