Skip to content

Instantly share code, notes, and snippets.

@sanhuang
Created September 18, 2016 11:20
Show Gist options
  • Save sanhuang/282ef41f3e2d5a8a9e4918d417f2c9fc to your computer and use it in GitHub Desktop.
Save sanhuang/282ef41f3e2d5a8a9e4918d417f2c9fc to your computer and use it in GitHub Desktop.
WeTalk修改SEO網址作法
dheader('Expires: '.gmdate('D, d M Y H:i:s', TIMESTAMP + 3600).' GMT');
if($attach['remote']) {
$filename = $_G['setting']['ftp']['attachurl'].'forum/'.$attach['attachment'];
} else {
$filename = DISCUZ_ROOT.$_G['setting']['attachdir'].'forum/'.$attach['attachment'];
// $filename = '/home/wetalk/public_html/data/attachment/forum/'.$attach['attachment'];
}
<meta property="og:site_name" content="$_G['setting']['bbname']"/>
<!--{if in_array('forum_viewthread', $_G['setting']['rewritestatus'])}-->
<meta property="og:url" content="$_G[siteurl]thread/{$_G[tid]}/1-1"/>
<!--{else}-->
<meta property="og:url" content="$_G[siteurl]forum.php?mod=viewthread&tid=$_G[tid]"/>
<!--{/if}-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment