分類
好用軟體

uptimerobot public status page功能

好用的 uptimerobot 服務, 參考之前文章: https://diary.tw/archives/216

之前 public status page 是在付費版本才有的, 現在已能在免費版本建立, 可以利用這個功能建立更方便的監控介面, 官方的監控在這裡(也是實際的 demo):

https://status.uptimerobot.com/

設定好之後, 可以使用 standard url 如: https://stats.uptimerobot.com/xxxx 或自訂網域方式(它也會協助建立 free ssl)實施, 配合自訂密碼, 方便呈現完整的 monitor dashboard.

免費版本無法看到 weekly view 與 monthly view, 僅有 daily view (僅最後 7天). 但也十分能滿足一般應用了.

還有整合進 slack channel 功能也十分方便, 不同的通知模式, 增進使用便利性.

請參閱官方相關資料:
https://blog.uptimerobot.com/introducing-public-status-pages-yay/
https://blog.uptimerobot.com/status-pagescustom-domains-are-now-https-enabled/

分類
FreeBSD/Linux

Apache使用.htaccess重導新網域

有時因為網域修改, 需要做網域級的重導, 建議使用 301 配合 .htaccess 的設定來進行, 可以使用以下語法:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.olddomain.com$
RewriteRule (.*)$ http://www.newdomain.com/$1 [R=301,L]

其中的 R=301 是使用了 301重導, 而新舊域名可以參考上面語法, 並且使用了 RewriteRule 將任意內容重導至新網域時, 維持相同的網址.

參考資料: https://wpscholar.com/blog/redirect-old-domain-to-new-domain-via-htaccess/