【问题标题】:URL Rewriting using undertow file handler使用 undertow 文件处理程序重写 URL
【发布时间】:2015-05-29 05:25:38
【问题描述】:

我目前正在尝试对通过本地文件系统的文件处理程序传递的内容使用 URL 重写。似乎没有这方面的文档和/或功能。我想我可以使用 war 文件正常工作(如本论坛中的回答 https://developer.jboss.org/message/915980),但不幸的是,这不适用于我的东西。

我的配置是这样的

<server name="default-server">
    <http-listener name="default" socket-binding="http" max-post-size="51200000" max-parameters="10000"/>
    <https-listener name="https" socket-binding="https" max-post-size="51200000" max-parameters="10000" security-realm="UndertowRealm"/>
    <host name="default-host" alias="localhost">
        <location name="/" handler="welcome-content"/>
        <access-log rotate="true"/>
        <filter-ref name="server-header"/>
        <filter-ref name="x-powered-by-header"/>
        <filter-ref name="connection"/>
    </host>
</server>
<servlet-container name="default">
    <jsp-config/>
</servlet-container>
<handlers>
    <file name="welcome-content" path="C:/path/to/private/docroot"/>
</handlers>

我尝试重建我的 docroot,它看起来像一个暴露的 .war 文件,所以我可以添加一个 WEB-INF/undertow-handler.conf 文件,其中包含以下规则:

regex['/Deploy/stuff/laptop/windows/(.*)/update.xml'] -&gt; rewrite['/Deploy/stuff/laptop/windows/new-update.xml']

但是这个文件和/或规则似乎被明显地忽略了。

非常感谢任何帮助。

【问题讨论】:

    标签: url-rewriting wildfly-8 undertow


    【解决方案1】:

    应该是undertow-handlers.conf,带有s

    【讨论】:

      猜你喜欢
      • 2014-10-01
      • 1970-01-01
      • 2017-12-12
      • 1970-01-01
      • 2013-03-25
      • 1970-01-01
      • 1970-01-01
      • 2018-03-30
      • 2015-02-13
      相关资源
      最近更新 更多