I have installed wordpress in a subdirectory (`blog`). In the root directory I have installed Magento. Now the file directory is as following:

```
app
downloader
includes
media
....
blog/wp-admin

```

My server is **nginx**. When I set the URL in the wordpress *Permalink Settings* to: 

```
http://www.example.com/blog/index.php/sample-post/ 

```

… all the posts are available. Now I want to remove the `index.php` from that URL. How should I do that? When I set the custom structure to …

```
http://www.example.com/blog/sample-post/

```

… the URLs are not resolved by WordPress and I get a 404.