gpt4 book ai didi

tuckey-urlrewrite-filter - Tuckey UrlRewrite 过滤器重定向除 foo.html 之外的所有 http 请求

转载 作者:行者123 更新时间:2023-12-04 08:44:29 24 4
gpt4 key购买 nike

我正在尝试将所有 http 请求重定向到 https,除了“health.html”,我需要通过端口 80 上的标准 http 提供服务;出于某种原因,下面的规则似乎并没有这样做——我确定这是一个语法问题......

想法?

<?xml version="1.0" encoding="utf-8"?><!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite      4.0//EN" "http://www.tuckey.org/res/dtds/urlrewrite4.0.dtd">
<urlrewrite>

<rule match-type="regex">
<note>
Redirect all http requests to https except health.html for EB monitoring
</note>
<condition type="header" operator="equal" name="X-Forwarded-Proto">^HTTP$</condition>
<condition name="request-uri" operator="notequal">^/health.html(.*)$</condition>
<from>^.*$</from>
<to type="permanent-redirect" last="true">https://%{server-name}%{request-uri}</to>
</rule>

<rule>
<note>
Allow TomCat to have SES links.
</note>
<condition type="request-uri" operator="notequal">\.(bmp|gif|jpe?g|png|css|js|txt|pdf|doc|xls|cfc|ico|php|asp)$</condition>
<condition type="request-uri" operator="notequal">^/railo-context(.*)$</condition>
<condition type="request-uri" operator="notequal">^/flex2gateway(.*)$</condition>
<condition type="request-uri" operator="notequal">^/jrunscripts(.*)$</condition>
<condition type="request-uri" operator="notequal">^/cfide(.*)$</condition>
<condition type="request-uri" operator="notequal">^/cfformgateway(.*)$</condition>
<condition type="request-uri" operator="notequal">^/files(.*)$</condition>
<condition type="request-uri" operator="notequal">^/images(.*)$</condition>
<condition type="request-uri" operator="notequal">^/javascripts(.*)$</condition>
<condition type="request-uri" operator="notequal">^/miscellaneous(.*)$</condition>
<condition type="request-uri" operator="notequal">^/stylesheets(.*)$</condition>
<condition type="request-uri" operator="notequal">^/favicon.ico(.*)$</condition>
<condition type="request-uri" operator="notequal">^/robots.txt(.*)$</condition>
<condition type="request-uri" operator="notequal">^/sitemap.xml(.*)$</condition>
<condition type="request-uri" operator="notequal">^/rewrite.cfm(.*)$</condition>
<condition type="request-uri" operator="notequal">^/health.html(.*)$</condition>
<condition type="request-uri" operator="notequal">^/public(.*)$</condition>
<from>^/(.*)$</from>
<to type="passthrough" last="true">/rewrite.cfm/$1</to>
</rule>
</urlrewrite>

最佳答案

我是个白痴。

<condition name="request-uri" operator="notequal">

应该是

<condition type="request-uri" operator="notequal">

感叹。

关于tuckey-urlrewrite-filter - Tuckey UrlRewrite 过滤器重定向除 foo.html 之外的所有 http 请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27730380/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com