nginx 網(wǎng)頁跳轉(zhuǎn)改如何處理?
發(fā)布時間:2020-06-15 點擊數(shù):6448
當你讓 你的舊網(wǎng)頁 跳轉(zhuǎn)到新網(wǎng)頁去 防止訪問流失 ,這是很有必要的,那么我們該如何操作呢?接下來小編給大家分享下:
下載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)站被封了!改動字段 又可以把訪客留住了
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)頁跳轉(zhuǎn)的分享,全網(wǎng)數(shù)據(jù)專注IDC多年,致力于為廣大新老用戶提供專業(yè)的深圳服務(wù)器托管,深圳服務(wù)器租用,深圳主機托管,云服務(wù)器租用等服務(wù)器資源,詳情歡迎咨詢客服了解。