DedeCMS??301????????÷??????
???????????? ???????[ 2015/4/8 13:05:48 ] ???????????ù??? ??????????
?????????????????DedeCMS??301????????÷?????????????????ο????????????????£?
????301?????????????????????????????????????????????www??????????www???????????????????301????????????????????? ??????????301????????????????????????????www???????????????????dedecms???÷????????????????????????????.
???????Linux???????????301?????
????1????????????±???????????“???”--“????”??“????????”???“???????”???????? .htaccess ????????????????????????????.
????2???ü??±??????????? .htaccess ???????????????????:
????Options +FollowSymLinks
????RewriteEngine on
????rewritecond %{http_host} ^phpfensi[nc]
????rewriterule ^(.*)$ http://www.jb51.net/$1 [r=301??nc]
????3????????滻??????????????????????????????????????????????IE???????????????????????www???????.
????????Windows???????????301????????html????????????????滻????????? index.php ?????????????:
<?php
$HOST=$_SERVER['HTTP_HOST'];
if ($HOST=="429006.com"|| $HOST==www.jb51.net"{
Header("HTTP/1.1 301 Moved Permanently");
Header("Location:http://www.jb51.net");
exit();
}
if(!file_exists(dirname(__FILE__).'/data/common.inc.php'))
{
header('Location:install/index.php');
exit();
}
require_once (dirname(__FILE__) . "/include/common.inc.php");
require_once DEDEINC."/arc.partview.class.php"; $GLOBALS['_arclistEnv'] = 'index';
$row = $dsql->GetOne("Select * From `dede_homepageset`");
$row['templet'] = MfTemplet($row['templet']);
$pv = new PartView();
$pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" .
$row['templet']);
$pv->Display();
?>
???????????????????:
<?php
$jump301=1;//?????301????????1?? 0??
$index_file='index.html';//?????? ?????SSI??shtml/shtm??
if(substr($_SERVER['SERVER_NAME']??0??4)!='www.'&&$jump301)
{
header('HTTP/1.1 301 Moved Permanently');
header('Location:http://www.'.$_SERVER['SERVER_NAME']);
exit();
}
if(!file_exists(dirname(__FILE__).'/data/common.inc.php'))
{
header('Location:install/index.php');
exit();
}
//???????HTML??
if(isset($_GET['upcache']))
{
require_once (dirname(__FILE__) . "/include/common.inc.php");
require_once DEDEINC."/arc.partview.class.php";
$GLOBALS['_arclistEnv'] = 'index';
$row = $dsql->GetOne("Select * From `dede_homepageset`");
$row['templet'] = MfTemplet($row['templet']);
$pv = new PartView();
$pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $row['templet']);
$pv->SaveToHtml(dirname(__FILE__).'/'.$index_file);
include(dirname(__FILE__).'/'.$index_file);
exit();
}
include(dirname(__FILE__).'/'.$index_file);
?>
???????:????????????????????301??????????????????
????????????????????dedecms?????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11