在織夢(mèng)dede網(wǎng)站可以看出,輸入www.zuimoban.com可以打開網(wǎng)站,但是輸入www.zuimoban.com/index.html也可以打開網(wǎng)站,這樣也會(huì)影響到網(wǎng)站的權(quán)重,所以在網(wǎng)站中可以使用兩種方法去掉index.html。
第一種方法:修改模板內(nèi)的對(duì)應(yīng)標(biāo)簽
在出現(xiàn)欄目鏈接的標(biāo)簽里(不局限于channe,l,list,arclist) ,只要是能調(diào)用出來欄目鏈接的標(biāo)簽都可以使用這個(gè)方法:
在標(biāo)記內(nèi)加入下面的代碼
function='str_replace("index.htm","",@me)'
注意:'str_replace("index.htm","",@me)'/其中的index.htm看您的實(shí)際情況換成index.html或者index.htm。
例子:
{dede:arclist function='str_replace("index.htm","",@me)'}...底層調(diào)用{/dede:arclist}
{dede:list function='str_replace("index.htm","",@me)'}...底層調(diào)用{/dede:list}
第二種方法:修改程序文件,一次性替換所有欄目鏈接的index.html
打開需要修改的文件:include/channelunit.func.php
找到if($isdefault==-1)
在前面加入
//跳轉(zhuǎn)網(wǎng)址
if($ispart>2){
return $typedir;
}
if($defaultname == 'index.html'){
$defaultname = '';
}
其中的index.html看您的實(shí)際情況換成index.html或者index.htm
新聞熱點(diǎn)
疑難解答
圖片精選