Remove part of url without breaking links

Topics: Developer Forum
Dec 19, 2008 at 2:27 PM
I am running php sites on an IIS7 server.  The rewrite filter is working perfectly but there is a slight issue and I cannot figure out how to work around it.

Currently, our links are formatted as such:

With the rewrite filter, the new links are formatted like:

The new format is obviously better and is what I was wanting to do but our site has been live for a while and there are many e-mails, bookmarks, etc. that will continue to point to the old links.  Below are the contents of my ini file.

How can I configure it so that if someone visits a link with /index.php in it, it will remove it and redirect them to the updated link so they do not receive a 404 page?

RewriteLogLevel 2
RewriteLog ..........
MaxMatchCount 10
RewriteCond %{HTTP_URL} (/|\.htm|\.php|\.html|/[^.]*)$  
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) / [U,L]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]