How to configure wordpress application in subdirectory with simple php application using .htaccess / Apache2?

My configuration:

domain: test.localhost

wordpress url: test.localhost/wordpress

.htaccess in the wordpress folder:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>

# END WordPress

Apache settings for the subdomain (Wamp server under windows)

<VirtualHost *:80>
    DocumentRoot "e:\Sync\www\test"
    ServerName localhost
    ServerAlias test.localhost

    <Directory "e:\Sync\www\test">
    Options Indexes FollowSymLinks
    AllowOverride all
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1
    Allow from ::1
    </Directory>

</VirtualHost>