htaccess - Deny requests from unauthorized domains

前端 未结 3 1436
广开言路
广开言路 2021-02-09 00:02

I have a website \"www.mysite.com\", and it has an its own ip. Now since few months I see several domains pointing to my ip server (it\'s not a shared ip). I can navigate thru t

3条回答
  •  借酒劲吻你
    2021-02-09 00:31

    I can't say particularly for htaccess. but through programming, you can achieve this. say, your domain is www.mydomain.com. suppose the browser is requesting for about-me section of your web site. you can do the following. I'm showing for PHP(as I am little educated with php).

    if u prefer other languages, they might have their way to get the host name.

提交回复
热议问题