If the rewrite rules in main domain’s .htaccess file are affecting the addon domain, then add below code (at end) in main domain’s .htaccess file. You can find the .htaccess file at public_html/
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?addondomain\.com
Rewriterule .* – [L]
</IfModule>
Note: Replace addondomain in above code with your addon domain
In our case, we moved all main domain’s images to a subdomain and added redirection rule in main domain’s .htaccess file. But, we observed that images on addon domain also started redirecting to the subdomain and that resulted in internal server error 500. We solved it by adding the above code.