问一个urlrewrite的问题,想实现类似新浪博客的地址

comezxn 2008-06-12 03:49:25
比如:我的地址是

http://space.xxx.com/index.asp?name=我的用户名(可以是任何字符,中文英文数字)

想转换成

http://space.xxx.com/我的用户名 (类似这样的url)

其中有个关键的地方是http://space.xxx.com/images/这样的链接不转换


应该怎样写这个rewrite规则?

已经实现了英文用户名的重写

RewriteRule ^/\b(?!images)\b(.*) /index.asp\?name=$1

但是中文用户名的就不行,请教应该怎么实现?
...全文
55 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
换一个写法看看
RewriteRule ^/\b(?!images)\b(A-Za-z0-9\u0391-\uFFE5) /index.asp\?name=$1

或RewriteRule ^/\b(?!images)\b(A-Za-z0-9\u0391-\uFFE5) /index.asp\?name=$2

  • 打赏
  • 举报
回复
RewriteRule ^/\b(?!images)\b(.*) /index.asp\?name=$1

正则不对吧

comezxn 2008-06-12
  • 打赏
  • 举报
回复
win2003
tantaiyizu 2008-06-12
  • 打赏
  • 举报
回复
什么服务器?

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧