How to remove the index.php in the url?

view full story

http://stackoverflow.com – my host server is nginx. in the root directory i have installed magento, then i created a file named blog, then installed wordpress into it. now, the directory is: app includes .... blog/wp-admin when i set http://www.example.com/blog/index.php/%postname%.html in Permalink Settings. access all the post, it's ok. now i want to remove the index.php. namely change it into http://www.example.com/blog/%postname%.html.when i delete the index.php. all the post are not unavailable, (HowTos)