I’m really tiered with some hackers ( if I can say ) who points their websites to my website, so I’m using .htaccess to resolve this issue with the following code:
but the problem that if ( hackerdomain.com ) points his subdmain ( sub.hackerdomain.com ) to my website, I have also to add the same code to my .htaccess as following:
Thank you Raffles and Johen Betong, in fact I removed ^ as you said Raffles and everything is much better.
let me explain why they do that, in fact I have a lot of traffic in my website, so when someone point his website, his real goal will be to get traffic from google by using my website content.
Are you sure this is the right move, though? If someone is visiting your site because they followed a link from a nasty site, it’s just going to look like your website doesn’t work. In fact, I’m not entirely sure what you’re trying to do, because it looks like you’re still redirecting them to your site (so it’s not really a redirection at all).
And finally, this should not be in the PHP forum, as it has nothing to do with PHP - this should be in the Apache configuration forum.