RewriteEngine On RewriteRule ^commtopics-(.*)-(.*) thread.php?fid=$1&page=$2 RewriteRule ^commtopics-(.*) thread.php?fid=$1&page=$2 RewriteRule ^article-(.*)-(.*)-(.*).html read.php?tid=$1&page=$2&fpage=$3 RewriteRule ^article-(.*)-(.*).html read.php?tid=$1&page=$2&fpage=$3 RewriteRule ^article-(.*).html read.php?tid=$1 RewriteRule ^(.*)-htm-(.*)$ $1.php?$2 RewriteRule ^(.*)/simple/([a-z0-9_]+.html)$ $1/simple/index.php?$2 |
function Htm_cv($url,$tag){ global $db_dir,$db_ext; $tmppos = strpos($url,'#'); $add = $tmppos!==false ? substr($url,$tmppos) : ''; $url = str_replace( array('.php?','=','&','&',$add), array($db_dir,'-','-','-',''), $url ).$db_ext.$add; return stripslashes($tag)."$url""; } |
function Htm_cv($url, $tag){//modify By Josh global $db_dir, $db_ext; if (!preg_match('/^(http|ftp|telnet|mms|rtsp)|admin.php|rss.php/i', $url)){ $add = strpos($url, '#') !== false ? substr($url, strpos($url, '#')) : ''; if(strpos($url, 'thread.php?') !== false){ unset($rw); //$rw->type $ru->array $thread_arr = explode('&', substr(str_replace($add, '', $url), 11)); foreach($thread_arr as $key => $value){ $ru = explode('=', $value, 2); if($ru['1']){ switch($ru['0']){ case 'fid': $rw['fid'] = $ru['1']; $rw['type'] < 1 && $rw['type'] = 1; break; case 'page': $rw['page'] = $ru['1']; $rw['type'] < 2 && $rw['type'] = 2; break; default: $rw['type'] = 4; $urlfail = 1; break; }}} switch($rw['type']){ case '1': $url = "commtopics-" . $rw['fid'] ; break; case '2': $url = "commtopics-" . $rw['fid'] . "-" . $rw['page'] ; break; }}elseif(strpos($url, 'read.php?') !== false){ unset($rw); $read_arr = explode('&', substr(str_replace($add, '', $url), 9)); foreach($read_arr as $key => $value){ $ru = explode('=', $value, 2); if($ru['1']){ switch($ru['0']){ case 'tid': $rw['tid'] = $ru['1']; $rw['type'] < 1 && $rw['type'] = 1; break; case 'page': $rw['page'] = $ru['1']; $rw['type'] < 2 && $rw[type] = 2; break; case 'fpage': $rw['fpage'] = $ru['1']; $rw['type'] < 3 && $rw['type'] = 3; break; default: $rw['type'] = 4; $urlfail = 1; break; }}} switch($rw['type']){ case '1': $url = "article-".$rw['tid'] . ".html"; break; case '2': $url = "article-".$rw['tid'] . "-" . $rw['page'] . ".html"; break; case '3': $url = "article-". $rw['tid'] . "-" . $rw['page'] . "-" . $rw['fpage'] . ".html"; break; } } if($urlfail){ $url = str_replace( array('.php?', '=', '&', $add), array($db_dir, '-', '-', ''), $url ) . $db_ext . $add; } } return stripslashes($tag) . "$url""; } |
旗下網(wǎng)站:耐思智慧 - 淘域網(wǎng) - 我的400電話 - 中文域名:耐思尼克.cn 耐思尼克.top
耐思智慧 © 版權(quán)所有 Copyright © 2000-2024 IISP.COM,Inc. All rights reserved
備案號碼:
粵ICP備09063828號
公安備案號:
粵公網(wǎng)安備 44049002000123號
域名注冊服務(wù)機(jī)構(gòu)許可:粵D3.1-20240003
CN域名代理自深圳萬維網(wǎng)
聲明:本網(wǎng)站中所使用到的其他各種版權(quán)內(nèi)容,包括但不限于文章、圖片、視頻、音頻、字體等內(nèi)容版權(quán)歸原作者所有,如權(quán)利所有人發(fā)現(xiàn),請及時告知,以便我們刪除版權(quán)內(nèi)容
本站程序界面、源代碼受相關(guān)法律保護(hù), 未經(jīng)授權(quán), 嚴(yán)禁使用; 耐思智慧 © 為我公司注冊商標(biāo), 未經(jīng)授權(quán), 嚴(yán)禁使用