您的当前位置:首页 --> Windows教程
Win httpd.ini 301、防盗链和绑定根目录设置
浏览次数:3389 关键词 ( )

在网上有很多人用全能空间,基本上服务商提供支持伪静态是 httpd.ini 格式的,今天我整理下httpd.ini格式的小小用处吧!

当然,你也可以【直接复制】下面的代码另存为 httpd.ini 伪静态文件上传至空间根目录即可:

[ISAPI_Rewrite]

# 3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32

# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP

#防盗链设置
RewriteCond Host: (.+)
RewriteCond Referer: (?!http://(?:weidao\.net|(.*)\.weidao\.net|baidu\.com|(.*)\.baidu\.com|discuz\.net|(.*)\.discuz\.net|google\.com|(.*).\google.com)).*
RewriteRule .*\.(?:jpg|jpeg|gif|png|bmp|rar|zip|exe) /img/jinzhifanyue.jpg [I,O,N]

#让指定域名访问指定根目录
RewriteCond Host: bbs\.weidao\.net
RewriteRule ^(.*)$ /bbs/$1 [I]

#网站301重定向
RewriteCond Host: ^www2\.weidao\.net$
RewriteRule (.*) http://www.weidao.net$1 [I,R]

#cPanel 开启Gzip
output_buffering = Off
output_handler =
zlib.output_compression = On

下一条 Windows Server 2008 R2远程桌面服务配置和授权激活
上一条 在Windows中批量绑定同网段IP地址

数千企业与站长的选择,7*24小时稳定运行

 了解更多套餐详细