好!欢迎访问迷津渡口 现在时间是: 天气 °C ~ °C

迷津渡口

越感到迷惑 越接近真理

.htaccess设置禁止某几个ip访问-重定向-静态缓存

最近有几个恶心的ip,小指指头都想破了,终于发现可以使用.htaccess禁止访问。

但是网上很多都是错的,apache 2.4和以前的版本又不一样:官网说明

<RequireAll>
Require all granted
Require not ip 180.97.106.36 180.97.106.37 180.97.106.161 180.97.106.162
</RequireAll>

额,把ip贴出来了,不好意思啦。。。

另外小指还发现了htaccess有非常强大的作用:

重定向non-www到www:

<IfModule mod_rewrite.c>
RewriteEngine on

RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>

添加静态缓存

<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A86400
ExpiresByType image/x-icon A2592000
ExpiresByType application/x-javascript A2592000
ExpiresByType text/css A2592000
ExpiresByType image/gif A604800
ExpiresByType image/png A604800
ExpiresByType image/jpeg A604800
ExpiresByType text/plain A604800
ExpiresByType application/x-shockwave-flash A604800
ExpiresByType video/x-flv A604800
ExpiresByType application/pdf A604800
ExpiresByType text/html A900
</IfModule>

还有好多但是个人不实用,而且最好不要添加太多,否则网站会变慢,所以小指就不贴了,需要的自己百度吧~

最后感谢帮助小指的大神^_^记得点赞哦~

点赞0
   支持一下
挤眼 亲亲 咆哮 开心 想想 可怜 糗大了 委屈 哈哈 小声点 右哼哼 左哼哼 疑问 坏笑 赚钱啦 悲伤 耍酷 勾引 厉害 握手 耶 嘻嘻 害羞 鼓掌 馋嘴 抓狂 抱抱 围观 威武 给力
 点赞
 签到
 表情
 图片
 代码
提交评论

清空信息
关闭评论
atrapaniapp
 atrapaniapp 2019-03-20 13:49回复
#114
<a href="http://www.koreazp.com/nike-air-max-thea-womens-purple-gold-shoesh">nike air max thea womens purple gold</a> <a href="http://www.hiltonskyshop.com/nike-zoom-ascention-viola-rosa-scarpei">nike zoom ascention viola rosa</a> <a href="http://www.lavaforchange.com/dam%C3%A4nner-nike-sb-stefan-janoski-max-orangen-gold-schuhej">dam盲nner nike sb stefan janoski max orangen gold</a> <a href="http://www.lifeonfilms.com/atlanta-braves-mesh-hat-hath">atlanta braves mesh hat</a> <a href="http://www.midlandroofer.com/nike-zoom-structure-19-femmes-bleu-violet-chaussuresh">nike zoom structure 19 femmes bleu violet</a> <a href="http://www.pearsonchool.com/femminile-nike-lebron-13-grigio-rosso-scarpeq">femminile nike lebron 13 grigio rosso</a>
atrapaniapp http://www.atrapaniapp.com/
diplomabroad
 diplomabroad 2019-03-19 15:40回复
#113
<a href="http://www.matrawildlife.com/air-jordan-retro-11-low-white-gold-shoesj">air jordan retro 11 low white gold</a> <a href="http://www.hiyawigs.com/usc-hat-hath">usc hat</a> <a href="http://www.fidgefingers.com/nike-free-blanco-5.0-zapatosl">nike free blanco 5.0</a> <a href="http://www.lintvan.com/nike-roshe-run-mens-grey-shoesk">nike roshe run mens grey</a> <a href="http://www.pubgdust.com/nike-dunk-gr%C3%A5-svart-obuvi">nike dunk gr氓 svart</a> <a href="http://www.ahtantalya.com/nike-roshe-run-nm-flyknit-hvit-obuvk">nike roshe run nm flyknit hvit</a>
diplomabroad http://www.diplomabroad.com/
bagsbeat
 bagsbeat 2019-03-18 19:14回复
#112
<a href="http://www.diplomabroad.com/nike-air-max-90-hyperfuse-negro-and-blanco-zapatosk">nike air max 90 hyperfuse negro and blanco</a> <a href="http://www.trechadental.com/the-north-face-outdoor-jacket-northfaceh">the north face outdoor jacket</a> <a href="http://www.akhbarsanaye.com/herren-nike-wei%C3%9F-huarache-schuhek">herren nike wei脽 huarache</a> <a href="http://www.timxes.com/adidas-zx-750-fl%C3%A5den-gul-skoi">adidas zx 750 fl氓den gul</a> <a href="http://www.leadercheetah.com/nike-internationalist-burgundy-rose-chaussuresh">nike internationalist burgundy rose</a> <a href="http://www.arealleader.com/detroit-tigers-new-era-mlb-dub-classic-39thirty-cap-hatl">detroit tigers new era mlb dub classic 39thirty cap</a>
[url=http://www.bagsbeat.com/]bagsbeat[/url]
geuwompo
 geuwompo 2019-03-18 01:04回复
#111
<a href="http://www.artoccsr.com/air-jordan-retro-3-all-hvit-kurpesf">air jordan retro 3 all hvit</a> <a href="http://www.bydecode.com/limited-nike-blue-mens-vernon-butler-alternate-jersey-nfl-92-carolina-panthers-vapor-untouchable-nflr">limited nike blue mens vernon butler alternate jersey nfl 92 carolina panthers vapor untouchable</a> <a href="http://www.chtalaska.com/dam%C3%A4nner-nike-flyknit-lunar-3-orange-lila-kurpesf">dam盲nner nike flyknit lunar 3 orange lila</a> <a href="http://www.fixlupusnow.com/nike-flyknit-lunar-1-squadron-bleu-urban-dictionary-schuhef">nike flyknit lunar 1 squadron bleu urban dictionary</a> <a href="http://www.hindikebol.com/nike-hyperdunk-2016-grigio-cielo-blu-obuvg">nike hyperdunk 2016 grigio cielo blu</a> <a href="http://www.motirealtor.com/jordan-size-us14-us15-verde-naranja-chaussuresa">jordan size us14 us15 verde naranja</a>
geuwompo http://www.geuwompo.com/
alcovozov
 alcovozov 2019-03-17 19:55回复
#110
<a href="http://www.mwartsdrama.com/air-yeezy-ii-2-sp-max-90-femmes-jaune-argent-chaussuresh">air yeezy ii 2 sp max 90 femmes jaune argent</a> <a href="http://www.meshmotors.com/hommes-nike-free-tr-rouge-rose-chaussuresj">hommes nike free tr rouge rose</a> <a href="http://www.aspenmedisys.com/herren-asics-gel-kinsei-4-gold-lila-schuhej">herren asics gel kinsei 4 gold lila</a> <a href="http://www.smartiesland.com/herre-nike-lunarglide-6-gr%C3%B8n-hvid-skop">herre nike lunarglide 6 gr酶n hvid</a> <a href="http://www.emcetolerie.com/femminile-nike-air-max-thea-grigio-rosso-scarpeh">femminile nike air max thea grigio rosso</a> <a href="http://www.lapaktoko.com/maschio-asics-gel-noosa-tri-8-gituttio-cielo-blu-scarpei">maschio asics gel noosa tri 8 gituttio cielo blu</a>
alcovozov http://www.alcovozov.com/
apkatsikas
 apkatsikas 2019-03-17 15:49回复
#109
<a href="http://www.completefight.com/nike-roshe-run-hyperfuse-wei%C3%9F-schwarz-gold-kurpesd">nike roshe run hyperfuse wei脽 schwarz gold</a> <a href="http://www.dealingsnet.com/zx-flux-gr%C3%A5-gul-scarped">zx flux gr氓 gul</a> <a href="http://www.eyehearsea.com/air-jordan-5-retro-gs-rosa-schuhee">air jordan 5 retro gs rosa</a> <a href="http://www.flixflight.com/herren-nike-air-max-zero-rot-gr%C3%BCn-obuvf">herren nike air max zero rot gr眉n</a> <a href="http://www.adappi.com/kvinders-air-jordan-retro-5-hvid-lilla-butya">kvinders air jordan retro 5 hvid lilla</a> <a href="http://www.berealto.com/nike-air-max-2017-femminile-blu-grigio-butya">nike air max 2017 femminile blu grigio</a>
apkatsikas http://www.apkatsikas.com/
eczacinim
 eczacinim 2019-03-16 14:16回复
#108
<a href="http://www.sugarforspice.com/dam%C3%A4nner-nike-air-presto-alle-grau-schuheh">dam盲nner nike air presto alle grau</a> <a href="http://www.mybancorphsa.com/adidas-tubular-runner-rosa-gull-obuvj">adidas tubular runner rosa gull</a> <a href="http://www.scopatore.com/femminile-asics-gel-kinsei-4-rosa-scarpek">femminile asics gel kinsei 4 rosa</a> <a href="http://www.galacticlogos.com/nike-lunarglide-7-femmes-gris-argent-chaussuresh">nike lunarglide 7 femmes gris argent</a> <a href="http://www.ispardmore.com/prada-black-and-red-wallet-pradah">prada black and red wallet</a> <a href="http://www.radioramabc.com/jersey-lebron-james-miami-heat-nfli">jersey lebron james miami heat</a>
eczacinim http://www.eczacinim.com/
animalpainvet
 animalpainvet 2019-03-16 11:30回复
#107
<a href="http://www.cnovas.com/nike-lunarglide-6-kvinners-s%C3%B8lv-gr%C3%B8nn-obuvj">nike lunarglide 6 kvinners s酶lv gr酶nn</a> <a href="http://www.omnicitycorp.com/femminile-nike-roshe-run-slip-grigio-bianca-scarpep">femminile nike roshe run slip grigio bianca</a> <a href="http://www.cmcheechalk.com/nike-lebron-12-ext-noir-chaussuresh">nike lebron 12 ext noir</a> <a href="http://www.armandopaz.com/prada-bt0696-bags-in-coffee-pradah">prada bt0696 bags in coffee</a> <a href="http://www.alrightdesign.com/baltimore-bandits-jersey-google-search-hockey-jerseys-pinterest-hockey-nfli">baltimore bandits jersey google search hockey jerseys pinterest hockey</a> <a href="http://www.parksindust.com/adidas-springblade-pro-sort-bl%C3%A5-skoq">adidas springblade pro sort bl氓</a>
animalpainvet http://www.animalpainvet.com/
baluntan
 baluntan 2019-03-14 15:17回复
#106
<a href="http://www.dbievents.com/indianapolis-colts-47-nfl-khaki-47-clean-up-cap-hatk">indianapolis colts 47 nfl khaki 47 clean up cap</a> <a href="http://www.ilankocaeli.com/billig-hvid-converse-skoj">billig hvid converse</a> <a href="http://www.msignworx.com/polo-ralph-lauren-mens-iconic-striped-rugby-polo-shirt-navy-white-s-poloh">polo ralph lauren mens iconic striped rugby polo shirt navy white s</a> <a href="http://www.dianegrams.com/mens-adidas-ultra-boost-blue-shoesi">mens adidas ultra boost blue</a> <a href="http://www.jobstodayng.com/nike-sb-blazer-low-marina-militare-blu-scarpej">nike sb blazer low marina militare blu</a> <a href="http://www.hardcoreboris.com/adidas-superstar-wei%C3%9F-silber-38-schuhej">adidas superstar wei脽 silber 38</a>
baluntan http://www.baluntan.com/
ahmztradefx
 ahmztradefx 2019-03-13 13:34回复
#105
<a href="http://www.ortzproducts.com/richard-sherman-seahawks-jersey-nflh">richard sherman seahawks jersey</a> <a href="http://www.cooterscamera.com/coach-tan-satchel-coachh">coach tan satchel</a> <a href="http://www.marjalfun.com/air-jordan-retro-1-femminile-rosa-nero-scarpeh">air jordan retro 1 femminile rosa nero</a> <a href="http://www.alecsblog.com/nike-kobe-11-femmes-rouge-oranger-chaussuresp">nike kobe 11 femmes rouge oranger</a> <a href="http://www.troudumonde.com/north-face-denali-mens-size-chart-northfaceh">north face denali mens size chart</a> <a href="http://www.smilesdrdavid.com/dam%C3%A4nner-nike-air-max-tailwind-5-rot-gelb-schuheq">dam盲nner nike air max tailwind 5 rot gelb</a>
ahmztradefx http://www.ahmztradefx.com/
顶部留言底部
 00:00/00:00
我想和你虚度时光 - 花房姑娘(9)
  1. 我想和你虚度时光
  2. 花房姑娘
  3. 恋恋风尘
  4. 我喜爱一切不彻底的事物
  5. 我的心里是满的
  6. Long Way
  7. 给少年的歌
  8. 晴日共剪窗
  9. 天上的月你的脸