Win httpd.ini 301、防盗链和绑定根目录设置
在网上有很多人用全能空间,基本上服务商提供支持伪静态是 httpd.ini 格式的,今天我整理下httpd.ini格式的小小用处吧!
当然,你也可以【直接复制】下面的代码另存为 httpd.ini 伪静态文件上传至空间根目录即可:
# 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
#让指定域名访问指定根目录
RewriteCond Host: bbs\.weidao\.net
RewriteRule ^(.*)$ /bbs/$1
#网站301重定向
RewriteCond Host: ^www2\.weidao\.net$
RewriteRule (.*) http://www.weidao.net$1
#cPanel 开启Gzip
output_buffering = Off
output_handler =
zlib.output_compression = On
页:
[1]