[英]What is the meaning of the “/” slash in such as the directive “allow from 000.111.222.333/444” in a .htaccess file?
例如,我的.htaccess文件中包含以下指令:
<Limit GET HEAD POST>
order deny,allow
allow from 1.37.0.0/16
allow from 23.226.128.240/31
allow from 23.234.68.64/27
allow from 23.234.80.200/29
allow from 23.234.91.160/27
deny from all
</Limit>
mod_rewrite
指令? 該值定義掩蓋地址中最高有效位的位數。 有關更多詳細信息,請參見CIDR上的Wikipedia頁面 。
例如,如果我指定10.0.0.0/8
,則表示允許10.*
(或拒絕,無論何種情況)。 這是因為IPv4地址中的每個八位位組都有8位(1個字節,又稱八位位組)。 如果我指定192.168.0.0/24
,則掩蓋了前24位(前3個八位位組),並且允許或拒絕192.168.0.*
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.