On Cloud Sites, due to our unique hosting environment, we require a slight addition to the code used for the Allow/Denyfeature. Basically the issue is that the requesting IP coming into a server is the IP of our load balancing server instead of the visitor's. This means limiting access on an IP level through .htaccess becomes problematic. The answer is that we provide an environment variable called X-Cluster-Client-Ip which has the visitor's ip.
In the .htaccess file containing your rules, place the following into your file:
Allowing only a certain IP/IP Addresses:
Allowing only a certain IP/IP Addresses when your site is using SSL:
Replace 000.000.000.000 with your IP address. This will only allow your IP address to access your site, and is a great way to develop your site without restrictions.
You can repeat line 1 to allow multiple IPs.
You can repeat line 1 to allow multiple IPs.
Denying an IP/Multiple IP addresses:
Denying an IP/Multiple IP addresses when your site is using SSL:
Replace 000\.000\.000\.000 with the IP address you want to deny. This will deny the IP address specified/multiple IP addresses (If you use multiple lines, as specified below).
You can repeat line 1 to deny multiple IP addresses.
You can repeat line 1 to deny multiple IP addresses.
Important note: Implementing this code may prevent images from loading on your cloud site. To address this you can add the following code do your .htaccess file:
沒有留言:
張貼留言
歡迎熱愛 Puzzle and Dragons 的玩家一起上來討論及研究各種降臨打法。
進擊的 Puzzle and Dragons Facebook 專頁現已開幕 ~ 歡迎大家上去追查各種新舊貼。 Enjoy your Puzzle and Dragons