POST TIME:2020-04-12 22:38
把上邊的代碼加入到首頁(yè)index.php中//主域名301跳轉(zhuǎn)到www $redirect301=1; //301跳轉(zhuǎn)開關(guān),1代表打開,0代表關(guān)閉 $index_file='index.html';
//指定網(wǎng)站默認(rèn)首頁(yè)文件,DeDeCMS設(shè)置為index.html,不支持SSI(shtml/shtm) if(substr($_SERVER['SERVER_NAME'],0,4)!='www.'&&$redirect301)
//判斷URL中是否帶www { header('HTTP/1.1 301 Moved Permanently'); header('Location:http://www.'.$_SERVER['SERVER_NAME']); //301跳轉(zhuǎn)到www exit(); }
的上邊。if(!file_exists(dirname(__FILE__).'/data/common.inc.php'))