Main domain .htaccess file affects addon domain [SOLVED]

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.

About the Author

SRINI S

A passionate blogger. Love to share solutions and best practices on wordpress hosting, issues and fixes, excel VBA macros and other apps

Leave a Reply

Your email address will not be published. Required fields are marked *