dede徹底擺脫了,開始研究phpcms,先是去掉域名后面的index.html適合Seo,讓欄目的鏈接變成www.49028c.com/xxx/而不是http://www.49028c.com/xxx/index.html.
方法有兩種:
一種是用PHP的 str_replace函數將INDEX.HTML替換掉,代碼如下:
- {php $data = subcat($module, $catid);}
- {loop $data $n $r}
- <li><a href="{$str_replace("index.html","",$r[url])}" id="menu_{$r[catid]}"><span>{$r[catname]}</span></a></li>
- {/loop}
第二種是更改PHPCMS的URL規則,在URL規則中把“index.{$fileext} ”去掉,比如把:{$catdir}/index.{$fileext}|{$catdir}/{$page}.{$fileext} 改成 :{$catdir}|{$catdir}/{$page}.{$fileext}
新聞熱點
疑難解答