Posts Tagged ‘.htaccess’

24 10 2010

.htaccess 判断域名跳转

bigCat Posted in Linux - 0 Comment
RewriteEngine on
RewriteCond %{HTTP_HOST} caitou.com$ [NC]
RewriteRule ^(.*)$ http://ooxx.me/$1 [L,R=301]
22 09 2010

.htaccess禁止目录浏览

bigCat Posted in Linux - 1 Comment

Options -Indexes

20 06 2010

tar 打包 . 开头的隐藏文件

bigCat Posted in Linux - 0 Comment

linux 下 tar 打包不会自动打包 . 开头的隐藏文件
又不能 .*

那就下面这种,哇哈哈
tar -czf dot.tar.gz * .[!.]*

4 10 2009

.htaccess 取消自定义目录PHP执行权限

bigCat Posted in Linux - 0 Comment

RewriteEngine on
RewriteCond % !^$
RewriteCond % !^http://(www\.)?mydomain.com/.*$ [NC]
RewriteRule \.(php)$ - [F]

29 09 2009

屏蔽百度蜘蛛

bigCat Posted in Linux - 1 Comment
i.feelinglucky: 小技巧,屏蔽蜘蛛 IP 不靠谱,使用 .htaccess 的 rewrite 模块即可
RewriteCond %{HTTP_USER_AGENT} !^Mozilla/[0-9.]+
RewriteRule .* - [F]
刚学了招,嘿嘿
bigCat: 求解读...
i.feelinglucky: 就是如果 user-agent 不是 Mozilla 开头,全屏蔽
i.feelinglucky: 是不是很淫荡,嘿嘿
Host: (miao) | Word: Press | Code: bigCat | Valid: HTML5