例如:在浏览器地址栏输入
http://forum.csdn.net/PointForum/Forum/PostTopic.aspx?forumID=9498中29-c8e9-4552-9be4-b01061443744
运行后就自动转成
http://forum.csdn.net/PointForum/Forum/PostTopic.aspx?forumID=9498%D6%D029-c8e9-4552-9be4-b01061443744问下用.htaccess能做到吗?
http://forum.csdn.net/PointForum/Forum/PostTopic.aspx?forumID=9498中29-c8e9-4552-9be4-b01061443744
运行后就自动转成
http://forum.csdn.net/PointForum/Forum/PostTopic.aspx?forumID=9498%D6%D029-c8e9-4552-9be4-b01061443744问下用.htaccess能做到吗?
转换成http://topic.csdn.net/u/20101230/15/93da39cb30c6
这样我本地没解析出来,希望能解析成http://topic.csdn.net/u/20101230/15/?type=93da39cb30c6
如:
http://topic.csdn.net/u/f6aaf83b-0f-4c86-91fa-93da39cb30c6RewriteRule ^([\w-]+)$ /u/index\.php\?para=$1 [L]之后,http://topic.csdn.net/u/index.php?para=93da39cb30c6但现在有了中文http://topic.csdn.net/u/f6aaf83b-哈哈0f-4呵呵c86-91fa-93da39cb30c6
匹配不出来了
RewriteCond %{REQUEST_FILENAME} -s
RewriteRule ^.*$ - [NC,L]
RewriteRule ^([\w\W]+)$ index\.php\?p=$1 [L]
http://topic.csdn.net/u/f6aaf83b-0f-4c86-91fa-1245678
转化成http://topic.csdn.net/u/index.php?para=1245678
用RewriteRule ^([\w-]+)$ /u/index\.php\?para=$1 [L]就成功了
现在有中文了http://topic.csdn.net/u/f6aaf83b-0f-4哈哈c86-91fa-1245678
用这个RewriteRule ^([\w\W]+)$ index\.php\?p=$1 [L]获取的是全部,我要的仅仅是最后一个‘-’后面的参数