Frage

Is there any solution to restrict aite access from its ip address like my website ip address is 22.22.22.22. It should open when user access by domain name only www.mydomain.com

Thanks in advance

War es hilfreich?

Lösung

put this code in your DOCUMENT_ROOT/.htaccess file:

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(4yourprice\.com|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)$ [NC]
RewriteRule ^ http://www.4yourprice.com%{REQUEST_URI} [L,NE,R=301]
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top