【问题标题】:What would cause a tomcat 404 with Railo 4 and mod_cfml for SES urls like /index.cfm/event/main.home?对于像 /index.cfm/event/main.home 这样的 SES url,什么会导致带有 Railo 4 和 mod_cfml 的 tomcat 404?
【发布时间】:2013-03-06 23:10:43
【问题描述】:

我明白了:

HTTP Status 404 - /admin/index.cfm/event/main.welcome

type Status report

message /admin/index.cfm/event/main.welcome

description The requested resource is not available.
Apache Tomcat/7.0.37

但是当我去的时候它工作正常:

/admin/index.cfm?event=main.welcome

/admin/event/main.welcome (thanks to htaccess)

但由于这是使用 MOD_CFML,我无法使用 HTACCESS 覆盖其中包含 .cfm 的网址。

我在网络上的任何地方都找不到这个... :-/

【问题讨论】:

  • 您必须将 /admin/index.cfm/* 添加到 tomcat 中的 ses url 映射中,除非有人知道更通用的方法来使这些工作。 stackoverflow.com/questions/12204536/…
  • 是的,这很好用......但当然对于多个项目来说绝对不是理想的......如果您将此添加为解决方案答案,我会批准它。它确实解决了问题,但如果有一个“MOD_CFML”或 Apache 解决方案可以更灵活地将这些重写存储在每个项目的代码库中,我会喜欢它。

标签: apache tomcat railo cfml


【解决方案1】:

您需要将此添加到您的web.xml“基本 SES 映射”

<url-pattern>/admin/index.cfm/*</url-pattern>

据我所知,没有办法将其设置为处理动态子文件夹,您必须为每个包含此类页面的子文件夹添加其中一个。

【讨论】:

  • 谢谢,这成功了。也许有一天会有一个更突出的解决方案,但现在这会很好。
  • 凯文,你真棒......你结束了我的挫败感。
猜你喜欢
  • 2015-11-14
  • 1970-01-01
  • 2012-05-22
  • 1970-01-01
  • 2014-03-06
  • 1970-01-01
  • 2023-04-02
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多