找回密码
 注册加入

扫一扫,极速登录

QQ登录

只需一步,快速开始

搜索
查看: 2428|回复: 0

房产伪静态方法。

[复制链接]
发表于 2011-11-23 15:14:04 | 显示全部楼层 |阅读模式
function_admincp.php rewritedata 函数加入相关
  1. if(in_array('forum_archiver', $_G['setting']['rewritestatus'])) {
  2.                         $data['search']['forum_archiver'] = "/<a href\="\?(fid|tid)\-(\d+)\.html(&page\=(\d+))?"([^\>]*)\>/e";
  3.                         $data['replace']['forum_archiver'] = "rewriteoutput('forum_archiver', 0, '\\1', '\\2', '\\4', '\\5')";
  4.                 }
复制代码
后面加入
  1. if(in_array('newhouse_view', $_G['setting']['rewritestatus'])) {
  2.                         $data['search']['newhouse_view'] = "/<a href\="house.php\?mod\=viewhouse&(amp;)?ac\=info&(amp;)?tid=(\d+)?"([^\>]*)\>/e";
  3.                         $data['replace']['newhouse_view'] = "rewriteoutput('newhouse_view', 0, '\\3')";
  4. }
复制代码

  1. $data['rulesearch']['forum_archiver'] = '{action}-{value}.html';
  2.                 $data['rulereplace']['forum_archiver'] = 'index.php?action={action}&value={value}';
  3.                 $data['rulevars']['forum_archiver']['{action}'] = '(fid|tid)';
  4.                 $data['rulevars']['forum_archiver']['{value}'] = '([0-9]+)';
复制代码
后面加入

  1. $data['rulesearch']['newhouse_view'] = 'newhouse-{hid}.html';//house
  2.                 $data['rulereplace']['newhouse_view'] = 'house.php?mod=viewhouse&ac=info&tid={hid}';//house
  3.                 $data['rulevars']['newhouse_view']['{hid}'] = '([0-9]+)';//house
复制代码
function_core.php 中 rewriteoutput 函数改造

  1. elseif($type == 'forum_archiver') {
  2.                 list(,, $action, $value, $page, $extra) = func_get_args();
  3.                 $host = '';
  4.                 $r = array(
  5.                         '{action}' => $action,
  6.                         '{value}' => $value,
  7.                 );
  8.                 if($page) {
  9.                         $fextra = '?page='.$page;
  10.                 }
  11.         }
复制代码
后加入

  1. elseif($type == 'newhouse_view') {
  2.                 list(,,$hid) = func_get_args();
  3.                 $host = '';
  4.                 $r = array(
  5.                         '{hid}' => $hid,
  6.                 );
  7.         }
复制代码
lang_admincp.php 中
  1. 'setting_seo_rewritestatus_forum_archiver' => '论坛 Archiver 页',
复制代码

后面加入

  1. 'setting_seo_rewritestatus_newhouse_view' => '楼盘浏览页',
复制代码


apache rewrite规则中加入

  1. RewriteCond %{QUERY_STRING} ^(.*)$
  2. RewriteRule ^newhouse-([0-9]+)\.html$ house.php?mod=viewhouse&ac=info&tid=$1&%1
复制代码

您需要登录后才可以回帖 登录 | 注册加入  

本版积分规则

Archiver|手机版|小黑屋|Discuz!扩展中心 ( 浙ICP备14042422号-1 )|网站地图QQ机器人

GMT+8, 2024-5-3 23:38 , Processed in 0.174405 second(s), 13 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表