php url重写问题 用的是thinkphp原地址:http://www.***.com/items/index?type=a目标地址:http://www.***.com/a 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 .htacess 我的也是伪静态ydtuiguang.com规则先写好,代码替换URL为规则里的格式RewriteEngine On#RewriteBase /# direct one-word accessRewriteRule ^index\.html$ index\.php [L]RewriteRule ^tg([0-9]+)p([0-9]+)\.html$ column\.php?cid=$1&page=$2 [QSA,L]代码就要写$html = str_replace('index.php', 'index.html', $html);$html = preg_replace("/\"column.php\?cid=(\d+)&id=(\d+)&page=(\d+)/i", "\"tg$1id$2p$3.html", $html); RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule /([^\/]*) /items/index?type=$1&%1 [L,NC] 借花献佛,我也问怎么才能输入abc.com转到www.abc.com域名管理里没有A记录设置 soap头部信息如何读取? php操作json的问题 html文件如何人解析php代码 不用链接的方式 如何能让一串图片二进制数据在WAP上显示?? PHP里面基类与派生类 一条INSERT语句求助!我在MYSQL5.0下好用!可是mysql4下就报错了! php有没有那个函数 可以设置NTFS权限 看看这个论坛,提提意见 php+windows2000 上传进度条??? 关于PHP主机的兼容性! PHPEclipse 怎么配置 请教这个代码在哪出现错误。显示是语法错误的!怎么办
规则先写好,代码替换URL为规则里的格式
RewriteEngine On
#RewriteBase /
# direct one-word access
RewriteRule ^index\.html$ index\.php [L]
RewriteRule ^tg([0-9]+)p([0-9]+)\.html$ column\.php?cid=$1&page=$2 [QSA,L]
代码就要写
$html = str_replace('index.php', 'index.html', $html);
$html = preg_replace("/\"column.php\?cid=(\d+)&id=(\d+)&page=(\d+)/i", "\"tg$1id$2p$3.html", $html);
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule /([^\/]*) /items/index?type=$1&%1 [L,NC]