近日发现,index.html和index.aspx和域名/都有权重,而且权重不同,想把index.html和index.aspx重新定位到/,不知道怎么操作?
人家php的程序用以下代码做了重定向,不知道我们的.NET语言怎么做?
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 `#@__homepageset`");
$row['templet'] = MfTemplet($row['templet']);
$pv = new PartView();
$pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $row['templet']);
$pv->SaveToHtml(dirname(__FILE__).'/index.html');
include(dirname(__FILE__).'/index.html');
exit();
}
else
{
header('HTTP/1.1 301 Moved Permanently');
header('Location:index.html');
}
也有人说在rewriter里写入:
RewriteRule ^index/.php$ http://域名/ [R=301,L]
同样是PHP语言的,不知道.NET里面怎么写?
已经自己解决了