Rewriting query string with htaccess without conflicting with WordPress

Solution:

Try this. Add another RewriteBase after the last line of WP htaccess

RewriteBase /names/
RewriteRule ^names/([a-zA-Z0-9_]+|)(-in-|)([a-zA-Z0-9_]+|)(-|)([a-zA-Z0-9_]+|)(-|)([0-9]+|)/?$ query.php?sector=$1&location=$3&firmname=$5&firmnumber=$7