求助,写一个Apache Rewrite 地址重写规则。 本帖最后由 guanbaolong 于 2011-07-21 11:58:18 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 RewriteRule ^(.*)/space/thread.php?uid=([0-9]+)&page=([0-9]+)$ $1/index.php?uid=$2 [PT]不知道对不对。自己试一试。 更正:RewriteRule ^(.*)/space/thread\.php\?uid=([0-9]+)&page=([0-9]+)$ $1/index.php?uid=$2 [PT] 建议学习初级URL重写指南 我是这么写的,帮忙看一下,哪里不对?^RewriteRule /space/(thread|news|comment).php?uid=([0-9]+) /index.php?uid=$2 [L,R=301] .htaccess里的重写规则如下:RewriteCond %{QUERY_STRING} ^uid\=([0-9]+)$RewriteRule ^space/(thread|news|comment).php$ /index.php?uid=%1 RewriteCond %{QUERY_STRING} ^uid\=([0-9]+)&page=([0-9]+)$RewriteRule ^space/(thread|news|comment).php$ /index.php?uid=%1&page=%2我这边测试通过,你试一下吧 ob_start不起作用 怎么让网站的 文章内容 自动更新至微博? php1 post php2,php2中$_POST没数据$_GET有数据 smarty,输入怎么是空值,求助各位大虾 PHP 那位大虾能说说他们有没有什么区别啊? 虚拟主机上如何让某个PHP文件每天运行1次? 关于url传递的问题 还是getenv() 关于PHP&MYSQL中日期的问题,请各位来瞧一瞧。高分求助。。 php 如何获取 远程内容 字符串保存数据库字符集的问题
不知道对不对。自己试一试。
建议学习初级URL重写指南
^RewriteRule /space/(thread|news|comment).php?uid=([0-9]+) /index.php?uid=$2 [L,R=301]
.htaccess里的重写规则如下:RewriteCond %{QUERY_STRING} ^uid\=([0-9]+)$
RewriteRule ^space/(thread|news|comment).php$ /index.php?uid=%1
RewriteCond %{QUERY_STRING} ^uid\=([0-9]+)&page=([0-9]+)$
RewriteRule ^space/(thread|news|comment).php$ /index.php?uid=%1&page=%2我这边测试通过,你试一下吧