Apache Rewrite LIMIT TIME

設定某時間後才能進入網頁
我們要用到Apache RewriteCond

Code:

RewriteEngine On
RewriteCond %{TIME_YEAR}%{TIME_MON}%{TIME_DAY}%{TIME_HOUR}%{TIME_MIN} <201204270000 
RewriteRule ^.*$ http://www.google.com/ [R,L]

FreeBSD ISSEU ::: mount & umount windows

MOUNT 在FreeBSD掛載在Windows的網路硬碟

指令如下
1. 不需帳號密碼
#mount_smbfs -I 192.168.1.10 -N '//sharehost/music' /mnt //-I 為指定 Host IP,-N 為指定不需密碼驗證
2. 需帳號密碼
#mount_smbfs -I 192.168.1.10 '//username@sharehost/music' /mnt //執行此指令後會請您輸入密碼 (可登入 Windows XP 的帳號及密碼)
3. 修改掛載後目錄的權限
#mount_smbfs -f 664 -d 755 '//username@sharehost/music' /mnt //-f 為指定檔案權限,-d 為指定目錄權限
掛載完可以用使用mount看到你掛載的資訊

UMOUNT 在FreeBSD載卸Windows的網路硬碟

假如你要卸掉不要的硬碟使用umount指令
umount -f /mnt  //強制 umount /mnt
假如遇到
umount: unmount of /mnt failed: Device busy
請先裝上fuser指令
cd /usr/ports/sysutils/fuser;make install clean    //安裝 fuser
然後在使用fuser刪掉/mnt佔用的程式
fuser -k /mnt //殺掉佔用 /mnt 的 Process
它就幫你刪掉囉 :)

參考: