nginx 網(wǎng)頁(yè)跳轉(zhuǎn)改如何處理?
發(fā)布時(shí)間:2020-06-15 點(diǎn)擊數(shù):15818
當(dāng)你讓 你的舊網(wǎng)頁(yè) 跳轉(zhuǎn)到新網(wǎng)頁(yè)去 防止訪問流失 ,這是很有必要的,那么我們?cè)撊绾尾僮髂兀拷酉聛硇【幗o大家分享下:
下載nginx
修改配置文件
vim /usr/local/nginx/conf/nginx.conf
修改內(nèi)容
server {
listen 80;
server_name localhost:
}
localhost / {
root html;
index index.html index.htm;
rewrite old.html new.html redirect;
}
3.重起服務(wù)/usr/local/nginx/sbin/nginx -s reload
4.ok 啦
曾經(jīng)我們公司網(wǎng)站被封了!改動(dòng)字段 又可以把訪客留住了
server {
listen 80;
server_name localhost;
rewrite ^/(.*)$ http://www.whatav.com/$1;
}
localhost / {
index www.xo.com www.xxoo.com
}
以上就是全網(wǎng)數(shù)據(jù)小編關(guān)于網(wǎng)頁(yè)跳轉(zhuǎn)的分享,全網(wǎng)數(shù)據(jù)專注IDC多年,致力于為廣大新老用戶提供專業(yè)的深圳服務(wù)器托管,深圳服務(wù)器租用,深圳主機(jī)托管,云服務(wù)器租用等服務(wù)器資源,詳情歡迎咨詢客服了解。