海洋cms演员伪静态方法

发布时间: 访问量:103

海洋cms演员默认是动态URL,原URL格式:
/search.php?searchword=汤唯修改后的URL格式:
/zhuyan/汤唯伪静态修改步骤:1、复制根目录的search.php,并重命名为zhuyan.php,然后修改此文件的内容:
$searchTemplatePath = "/templets/".$GLOBALS['cfg_df_style']."/".$GLOBALS['cfg_df_html']."/search.html";修改为:
$searchTemplatePath = "/templets/".$GLOBALS['cfg_df_style']."/".$GLOBALS['cfg_df_html']."/zhuyan.html";2、为主演电影合集页面制作一个单独的模板,并命名为:zhuyan.html,或者直接复站内模板search.html,然后修改成zhuyan.html;
3、修改程序:/include/common.func.php,找到代码:
function getKeywordsList($key,$span){
if($key=='')return $key;
$keyWordsStr="";
$keystr=str_replace(",",",",$key);
if (strpos($keystr,",")>0){$keyWordsArray=explode(",",$keystr);}else{$keyWordsArray=explode(" ",$keystr);}
for($kli=0;$kli修改为:
function getKeywordsList($key,$span){
if($key=='')return $key;
$keyWordsStr="";
$keystr=str_replace(",",",",$key);
if (strpos($keystr,",")>0){$keyWordsArray=explode(",",$keystr);}else{$keyWordsArray=explode(" ",$keystr);}
for($kli=0;$kli伪静态规则:web.config规则:


http.ini规则:
#zhuyan
RewriteRule ^(.*)/zhuyan/(.+?)\$ $1/search\.php\?searchword=$2\.htaccess规则:
#zhuyan
RewriteRule zhuyan/(.+?)$ zhuyan.php?searchword=$1修改完成后,在内容页中查看演员的URL地址就会变成伪静态的格式,而不是之前的动态搜索的格式!
注意:zhuyan目录可以自由修改为任意名称。各位网友如有更好的解决方法,欢迎交流!

更多文章