supesite页面链接静态化修改方法
1,修改function/common.func.php
查找
| function geturl($pstring, $urlmode=0) { global $_SGLOBAL, $_SCONFIG, $spaceself; |
添加
| if($out[1]&&$out[2]){ return '/html/'.substr($out[1],-2).'/n-'.$out[1].'-'.$out[2].'.html'; } preg_match('/action\/viewnews\/itemid\/(.*?)\//',$pstring.'/',$out); if($out[1]){ return '/html/'.substr($out[1],-2).'/n-'.$out[1].'.html'; } preg_match('/action\/category\/catid\/(.*?)\/page\/(.*?)\//',$pstring.'/',$out); if($out[1]&&$out[2]){ return '/html/'.$out[1].'/category-catid-'.$out[1].'-page-'.$out[2].'.html'; } preg_match('/action\/category\/catid\/(.*?)\//',$pstring.'/',$out); if($out[1]){ return '/html/'.$out[1].'/category-catid-'.$out[1].'.html'; } preg_match('/action\/(.*?)\//',$pstring.'/',$out); if($out[1]=='news'){ return '/html/'.$out[1].'.html'; } |
2,修改根目录的error.php
具体参见《supesite自动更新html静态化文件》一文中关于error.php的设置



