I am using magento software and I am having trouble rewriting the url link. For example:


and change it to


with the same results as the first.

NOTE: its not a redirect, just a rewrite.

Now the problem is since I am using magento then the rewrite mod is all screwed up when hard coded in the .htaccess and the url rewrite management interface does not offer this option so I am trying to implement it using javascript. Any ideas?