ڵλǣվȺϵͳ > ѧϰ¼ > -> DEDEºбʹöʵǧվ

604888金神童高手论坛

ʱ䣺2019-04-18 11:52

ͻ룬ˣ˰ɡʵˣˣҲпͻϵܡ

DEDEºбʹö˵SEOЧȽϺáıȽϺãһ˵¼þͶ࣬Ϳ죬˵Ȩؿܻһ㣬¼ȶһ㡣

˵Ч¼һЩ

1ҪIIS֧rewriteApache֧mod_rewrite
2ûжҪ֧.htaccess

һ۵*.4wei.cn..8.8.8̫

ڶ.htaccssϴվĿ¼ʵֶתֹ˷ǰhtmlҳ棬ΪͬݿܻɱKıߡ


 RewriteEngine On
 RewriteCond %{HTTP_HOST} [^.]+\.4wei\.cn$
 RewriteCond %{HTTP_HOST} !^[a-zA-Z]{1,3}\.4wei\.cn$
 RewriteCond %{HTTP_HOST} !^(admin|blog|www)\.4wei\.cn$
 RewriteRule ^/?$ %{HTTP_HOST} [NC]
 #12345.4wei.cnд 4wei.cn/content.12345.html
 RewriteRule ^(\d+)\.4wei\.cn$ /content/$1.html [C]

 #ʹ˶ǰhtmļͲҪ˷
 order allow,deny
 deny from all

޸ġ÷2

  • ²࣬ɾ̬ǿֱrewriteʵ
  • ºܶ࣬ǿʹα̬ʵ֣ܼ򵥣ɾ̬ļǵһ˽ǵ顣

ʹдһ룬ŷּдҲһ˵顣

޸漰channelunit.func.phpĿַµַɺг޸ķ

//ַ
/*************************************************
Ҫļ·ֱ
GetFileUrl($aid,$typeid,$timetag,$title,$ismake,$rank,$namerule,$typedir,$money)
Dzָվ򷵻൱ԸĿ¼ʵ·
**************************************************/
function GetFileUrl($aid,$typeid,$timetag,$title,$ismake=0,$rank=0,$namerule='',$typedir='',
$money=0, $filename='',$moresite=0,$siteurl='',$sitepath='')
{
 return "http://{$aid}.{$GLOBALS['cfg_siteurl']}/";
}
//ָĿURL
//ʹ÷ļ͵ҳǿʹĬҳ
function GetTypeUrl($typeid,$typedir,$isdefault,$defaultname,$ispart,$namerule2,$moresite=0,$siteurl='',$sitepath='')
{
 global $cfg_typedir_df;
 return "http://list{$typeid}.{$GLOBALS['cfg_siteurl']}/";
}

Ŀµĵַ滻Ժ󣬹ܻɡĹǸ·ҳЧʵͦѣλֻȰ״ȴ¡

ҳ view.php Ϊ

һ $arc->Display();
DzǺsmartyģ濴
ʵ$arc->Display(); echo($arc->Get());
echoǰһ滻ɶ͸ɶ ̬α̬