[Linux] 網路卡設定 – Network Configuration – CentOS/Ubuntu

CentOS 官網文件:14.1. Network Configuration Files Path: /etc/sysconfig/network-scripts/ 依照每張網卡擁有各自設定檔: ifcfg-eth0 ifcfg-eth1 新增流程: 如上格式新增完成一張網卡設定檔後,啟用該編號 ifup eth1 設定範例: DEVICE=eth1 BOOTPROTO=static ONBOOT=yes IPADDR=192.168.0.100 NETMASK=255.255.255.0 Centos 預設 ONBOOT 是關閉的,開啟才能開機自動啟用網卡 Debian resolv.conf – Debian Wiki networking – Where should I configure DNS in Debian 11? – […]

[PHP][HTML][JS] 網頁自動轉址/導向頁面範例 301 & 302

HTML HTML Meta Refresh 效果同於 JS location.replace(),Browser 不會產生新的 history.state: <meta http-equiv="refresh" content="0;url=http://code.yidas.com" /> Example HTML page: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="refresh" content="0;url=http://code.yidas.com" /> <title>Redirection</title> </head> <body></body> </html> Front-End Javascript Replace – 轉導取代 history.state (Moved Permanently) <script>location.replace("http://code.yidas.com");</script> […]