关于url重写之urlrewrite.xml配置

C-J C-J 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

在网上看到不少网站使用,十分羡慕,但是火候欠佳,特意请教大神们,感激不尽!

ssh2开发的,先上urlrewrite.xml里的配置:
<urlrewrite>
<rule>
<note>WebRoot下的文件改成*.html</note>
<from>/([A-Za-z0-9]+).html</from>
<to type="forward">/$1.jsp</to>
</rule>
</urlrewrite>

以上都可以跳转到相应的jsp页面,但是我想跳到的是action并且传有参数。
例如:点击topic-168.html会转到topicAction_detail?id=168,尝试不少,但是就报
HTTP Status 404 - /demo/topicAction_detail
type Status report
message /demo/topicAction_detail
description The requested resource is not available.


怎么回事?求解

...全文
评论 6
收藏 已收藏
分享
返回顶部
C-J
Web 开发 81,108 成员 341,721 内容