拒绝其他领域指向我


reject other domain point to mine

我发现一个域重定向到我的网站,我不知道为什么?如何拒绝?我使用apache,php(slim框架),并编辑.htaccess文件,添加最后两行我不确定我做得对吗?有遗漏的错误吗
以及如何在没有CCD_ 2的情况下也接受CCD_?

RewriteEngine On
RewriteBase /
RewriteCond $1 !^(index'.php|assets|robots'.txt|favicon'.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
RewriteCond %{HTTP_HOST} !^www.example.com$
RewriteRule ^/?(.*) http://www.example.com/$1 [QSA,R=301,L]

您可以交换规则并使www可选:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^(www'.)?example'.com$ [NC]
RewriteRule ^/?(.*) http://www.example.com/$1 [NE,R=301,L]
RewriteCond $1 !^(index'.php|assets|robots'.txt|favicon'.ico) [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]