During my root folder I've installed wordpress and there's also my submenu.php that cannot be packed with ajax basically use rules for /%postname%/ (in arrears )

Making this what Wordpress provided

# 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]
# END WordPress

What should i add to ensure that calling


works again?

This isn't how you ought to be carrying out AJAX within WordPress.

It is best to educate yourself on Using AJAX within WordPress in the codex.

I'm not great with htaccess, but this

RewriteRule !^media/ index.php [L]

Will redirect everything except media/* to index, so something similar to this will work

RewriteRule !^yourscript.php index.php [L]

Note: To be sure with Jason there, utilizing it without htaccess is much better.