0
votes

I have hosted a few sites on a Hostgator server. I have an htaccess for the main domain, limiting the access from a certain set of IPs. the main domain is in the root folder.

I have another website in a sub-folder which is being affected by the main htaccess file for ip block. I want that the ip block only goes for the main domain and none of the addon domains.

Please advice. I have read a lot of similar threads but the solution mentioned hasn't worked. The solution I found was adding the following code to the root htaccess file -

RewriteCond %{HTTP_HOST} ^(www.)?addon_domain.com Rewriterule .* - [L]

I did replace the addon_domain with the actual domain with the correct TLD. When I add this, I get a 500 error.

1

1 Answers

-1
votes

It may have been the simplest of solution but for some reason, I couldn't find the answer online. One of my friends suggested to just use allow from all in the htaccess of the addon domain and it now works. :)