RewriteEngine on
RewriteCond %{SERVER_NAME} ^(www\.)?anotherdomain\.com$ [OR]
RewriteRule ^ - [F]
<Directory /home/mydomain/public_html/>
AllowOverride none
Order Allow,Deny
Allow from all
</Directory>
HelloIt seems to work. And block the "anotherdomain" with a 403 or 404 error.
What solution is better for you?
RewriteCond %{SERVER_NAME} !^(www\.)?yourdomain\.com$
RewriteCond %{SERVER_NAME} !^(www\.)?youraliases\.com$
RewriteRule ^ - [F]
thank you for your reply..Hello Andy766, and sorry.
Put this in your .htaccess
Works for me.Code:RewriteCond %{SERVER_NAME} !^(www\.)?yourdomain\.com$ RewriteCond %{SERVER_NAME} !^(www\.)?youraliases\.com$ RewriteRule ^ - [F]
In the SERVER_NAME you need specify the domains that you want to access to your website.
RewriteCond %{SERVER_NAME} !^(www\.)?andy766\.com$
RewriteRule ^ - [F]
RewriteCond %{SERVER_NAME} !^(www\.)?andy766\.com$
RewriteCond %{SERVER_NAME} !^(www\.)?andy766aliases\.com$
RewriteRule ^ - [F]
Yes, test it please.Are you sure he's linking to your domain or could the entire website have been ripped and posted to some other domain?
Sorry! This works for me.i tried
RewriteCond %{SERVER_NAME} !^(www\.)?mydomain\.com$
RewriteRule ^ - [F]
but still i can see my website from the other domain
nope this is not the case... bcz if i edit anything on my site.. lets say design.. etc.. it reflects on his domain..seems like he is using some type of iframeAre you sure he's linking to your domain or could the entire website have been ripped and posted to some other domain?
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
U | SOLVED Addon domains stopped working | Domain Management | 2 | |
K | Stop another domain from displaying my website | Domain Management | 6 | |
H | SOLVED How to stop the nameservers entered in WHM leaking? | Domain Management | 5 | |
M | Addon Domains Stopped Working | Domain Management | 5 | |
Z | Cron job stopped working | Domain Management | 11 |