想用wordpress的Permalink,但是空間不支持mod_rewrite,連index.php也不行~~
想用wordpress的Permalink,但是空間(萬網(wǎng)滴)不支持mod_rewrite,連index.php也不行~~
用了index.php/%year%/%monthnum%/%day%/%postname%/
訪問不會(huì)出錯(cuò)但是不會(huì)跳轉(zhuǎn)到正常的頁面,所以我想了個(gè)方法
理論上的代碼,還沒有實(shí)現(xiàn)
<?php
#$base_uri = index.php/page/welcome.html 頁面標(biāo)志 = page
#$base_uri = index.php/entity/2005/12/25/4.index.html 頁面標(biāo)志 = entity
#$base_uri = index.php/catalog/wordpress.html 頁面標(biāo)志 = catalog
$base_uri = $_SERVER['REQUEST_URI'];


#通過硬面碼字符串處理得到下邊兩個(gè)值
$remark = "";//拿到頁面的標(biāo)志參數(shù)
$id = ""; //拿到參數(shù)值


if($remark == "page"){
include "index.php?page=".$id;
return;
}else if($remark == "category"){
include "index.php?catalog=".$id;
return;
}else if($remak == "entity"){
include = "index.php?p=".$id;
}

?>
用了index.php/%year%/%monthnum%/%day%/%postname%/
訪問不會(huì)出錯(cuò)但是不會(huì)跳轉(zhuǎn)到正常的頁面,所以我想了個(gè)方法
理論上的代碼,還沒有實(shí)現(xiàn)
























posted on 2005-12-26 16:09 bluesky 閱讀(1034) 評(píng)論(0) 編輯 收藏 所屬分類: PHP