- 积分
- 127886
- 在线时间
- 小时
- 注册时间
- 2010-9-23
- 最后登录
- 1970-1-1
|
function_admincp.php rewritedata 函数加入相关- if(in_array('forum_archiver', $_G['setting']['rewritestatus'])) {
- $data['search']['forum_archiver'] = "/<a href\="\?(fid|tid)\-(\d+)\.html(&page\=(\d+))?"([^\>]*)\>/e";
- $data['replace']['forum_archiver'] = "rewriteoutput('forum_archiver', 0, '\\1', '\\2', '\\4', '\\5')";
- }
复制代码 后面加入- if(in_array('newhouse_view', $_G['setting']['rewritestatus'])) {
- $data['search']['newhouse_view'] = "/<a href\="house.php\?mod\=viewhouse&(amp;)?ac\=info&(amp;)?tid=(\d+)?"([^\>]*)\>/e";
- $data['replace']['newhouse_view'] = "rewriteoutput('newhouse_view', 0, '\\3')";
- }
复制代码
- $data['rulesearch']['forum_archiver'] = '{action}-{value}.html';
- $data['rulereplace']['forum_archiver'] = 'index.php?action={action}&value={value}';
- $data['rulevars']['forum_archiver']['{action}'] = '(fid|tid)';
- $data['rulevars']['forum_archiver']['{value}'] = '([0-9]+)';
复制代码 后面加入
- $data['rulesearch']['newhouse_view'] = 'newhouse-{hid}.html';//house
- $data['rulereplace']['newhouse_view'] = 'house.php?mod=viewhouse&ac=info&tid={hid}';//house
- $data['rulevars']['newhouse_view']['{hid}'] = '([0-9]+)';//house
复制代码 function_core.php 中 rewriteoutput 函数改造
- elseif($type == 'forum_archiver') {
- list(,, $action, $value, $page, $extra) = func_get_args();
- $host = '';
- $r = array(
- '{action}' => $action,
- '{value}' => $value,
- );
- if($page) {
- $fextra = '?page='.$page;
- }
- }
复制代码 后加入
- elseif($type == 'newhouse_view') {
- list(,,$hid) = func_get_args();
- $host = '';
- $r = array(
- '{hid}' => $hid,
- );
- }
复制代码 lang_admincp.php 中- 'setting_seo_rewritestatus_forum_archiver' => '论坛 Archiver 页',
复制代码
后面加入
- 'setting_seo_rewritestatus_newhouse_view' => '楼盘浏览页',
复制代码
apache rewrite规则中加入
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^newhouse-([0-9]+)\.html$ house.php?mod=viewhouse&ac=info&tid=$1&%1
复制代码
|
|