用戶登陸

網(wǎng)站相關(guān)幫助

網(wǎng)站制作
模版設(shè)置
網(wǎng)站編輯
網(wǎng)站欄目設(shè)置
手機(jī)網(wǎng)站
微信網(wǎng)站
發(fā)布網(wǎng)站
模塊操作
系統(tǒng)管理
常見(jiàn)問(wèn)題

幫助文檔

PHPwind如何在我公司虛擬主機(jī)使用偽靜態(tài)
我公司虛擬主機(jī)配置為IIS+ISAPI URL_reWrite3
在Phpwind 7.5系統(tǒng)中開(kāi)啟偽靜態(tài)并進(jìn)行以下操作
 
首先您需要建立一個(gè)FTP中的www目錄里新建一個(gè)名為.htaccess的文件,并插入以下代碼后保存:
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
 
 然后將global.php打開(kāi),找到523行,替換以下函數(shù)

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\"";
上一篇:FTP 狀態(tài)代碼及其原因       下一篇:有沒(méi)有不用備案的主機(jī)?

備案系統(tǒng)認(rèn)證 舉報(bào)不良網(wǎng)站 我們的支付方式 AAA級(jí)信用
廣州萬(wàn)戶網(wǎng)絡(luò)信息科技有限公司 旗下網(wǎng)站建設(shè)品牌:中外商貿(mào) m.moderntrendboss.com 版權(quán)所有 ©2000-2019 All Rights Reserved
網(wǎng)站備案編號(hào):粵ICP備15049595號(hào) 地址:廣州市番禺區(qū)大石街北聯(lián)圍仔工業(yè)路2號(hào)E座305
電話:020-85421558   傳真:020-88140140   郵編:510515
交換PR>=4的友情鏈接合作站,歡迎同行聯(lián)系鏈接QQ: