求助,写一个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我这边测试通过,你试一下吧 帮我跟改个页面样式 熟悉淘宝api的进来下 如何在PHP中实现按钮跳转页面 php动态生成数组元素问题 一些大型网站是怎么把.php文件显示成.html文件的 导出csv文件,显示乱码,急!!! 这个论坛要用一天做出来,拜托各位大虾帮忙了 问一个关于时间的问题 问一下:论坛里过滤一些非法文章怎么做呀? wordpress里写个插件,想弄个全局变量给插件用 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我这边测试通过,你试一下吧