The core of WordPress will not touch your .htaccess file outside the comments.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Plugins such as WP Super Cache might but I’ve never experienced any loss of personal changes.
As to your request, you have options:
1/ i’d do a simple plugin so you keep all the benefits of wordpress (built-in security, awesome helper functions, etc.).
2/ You want your own php file, but use wordpress magic? You simply need to include wp-load.php . That’s not recommanded though, but you’re your own master…
3/ put your php file anywhere you want: it will work provided you have this rewrite condition before the rewrite rule : RewriteCond %{REQUEST_FILENAME} !-f
: it says “if file exists, don’t redirect to index.php”.