This file is indexed.

/etc/jetty/jetty-rewrite.xml is in jetty 6.1.24-6.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">

<!-- =============================================================== -->
<!-- Mixin the RewriteHandler                                        -->
<!-- =============================================================== -->


<Configure id="Server" class="org.mortbay.jetty.Server">

    <!-- =========================================================== -->
    <!-- Configure Rewrite Handler                                   --> 
    <!-- =========================================================== -->
    <Get id="oldhandler" name="handler"/>

    <Set name="handler">
     <New id="Rewrite" class="org.mortbay.jetty.handler.rewrite.RewriteHandler">
     
      <Set name="handler"><Ref id="oldhandler"/></Set>
      <Set name="rewriteRequestURI">true</Set>
      <Set name="rewritePathInfo">false</Set>
      <Set name="originalPathAttribute">requestedPath</Set>

      <Set name="rules">
          <Array type="org.mortbay.jetty.handler.rewrite.Rule">

           <!-- return an error message if low on threads; put this at the top so it will be processed first -->
           <Item>
             <New id="lowThreads" class="org.mortbay.jetty.handler.rewrite.LowThreadsRuleContainer">                
                <!-- set the trigger for low threads ridiculously low 
                uncomment the block below to see it in action -->
                <!--Ref id="Server">
                  <Get id="serverThreadPool" name="threadPool">
                    <Set name="minThreads">3</Set>
                    <Set name="maxThreads">4</Set>
                    <Set name="lowThreads">0</Set>
                  </Get>
                </Ref>

                <Set name="threadPool"><Ref id="serverThreadPool"/></Set-->
                
                <Call name="addRule">
                  <Arg>
                    <New id="busyresponse" class="org.mortbay.jetty.handler.rewrite.ResponsePatternRule">
                        <Set name="pattern">/*</Set>
                        <Set name="code">500</Set>
                        <Set name="reason">Server busy</Set>
                   </New>
                  </Arg>
                </Call>
             </New>
           </Item>

            <!-- Add rule to protect against IE ssl bug -->
            <Item>
              <New class="org.mortbay.jetty.handler.rewrite.MsieSslRule"/>
            </Item>

            <!-- protect favicon handling -->
            <Item>
              <New class="org.mortbay.jetty.handler.rewrite.HeaderPatternRule">
                <Set name="pattern">/favicon.ico</Set>
                <Set name="name">Cache-Control</Set>
                <Set name="value">Max-Age=3600,public</Set>
                <Set name="terminating">true</Set>
              </New>
            </Item>


            <!-- add a regex rule -->
            <Item>
              <New class="org.mortbay.jetty.handler.rewrite.RewriteRegexRule">
                <Set name="regex">/rewrite/dump/regex/([^/]*)/(.*)</Set>
                <Set name="replacement">/test/dump/$2/$1</Set>
              </New>
            </Item>

            <!-- add a rewrite rule -->
            <Item>
              <New id="" class="org.mortbay.jetty.handler.rewrite.RewritePatternRule">
                <Set name="pattern">/rewrite</Set>
                <Set name="replacement">/rewrittento</Set>
              </New>
            </Item>
            
            <!-- add a response rule -->
            <Item>
              <New id="response" class="org.mortbay.jetty.handler.rewrite.ResponsePatternRule">
                <Set name="pattern">/rewrite/session/</Set>
                <Set name="code">401</Set>
                <Set name="reason">Setting error code 401</Set>
              </New>
            </Item>

            <!-- add a header pattern rule -->
            <Item>
              <New id="header" class="org.mortbay.jetty.handler.rewrite.HeaderPatternRule">
                <Set name="pattern">*.jsp</Set>
                <Set name="name">Server</Set>
                <Set name="value">Server for JSP</Set>
              </New>
            </Item>

            <!-- add a redirect -->
            <Item>
              <New id="redirect" class="org.mortbay.jetty.handler.rewrite.RedirectPatternRule">
                <Set name="pattern">/rewrite/dispatch</Set>
                <Set name="location">http://jetty.mortbay.org</Set>
              </New>
            </Item>

            <Item>
              <New id="forwardedHttps" class="org.mortbay.jetty.handler.rewrite.ForwardedSchemeHeaderRule">
                <Set name="header">X-Forwarded-Scheme</Set>
                <Set name="headerValue">https</Set>
                <Set name="scheme">https</Set>
              </New>
            </Item>

            <Item>
              <New id="virtualHost" class="org.mortbay.jetty.handler.rewrite.VirtualHostRuleContainer">

                <Set name="virtualHosts">
                  <Array type="java.lang.String">
                    <Item>mortbay.com</Item>
                    <Item>www.mortbay.com</Item>
                    <Item>mortbay.org</Item>
                    <Item>www.mortbay.org</Item>
                  </Array>
                </Set>

                <Call name="addRule">
                  <Arg>
                    <New class="org.mortbay.jetty.handler.rewrite.CookiePatternRule">
                      <Set name="pattern">/*</Set>
                      <Set name="name">CookiePatternRule</Set>
                      <Set name="value">1</Set>
                    </New>
                  </Arg>
                </Call>
     
             </New>
           </Item>           
          </Array>
        </Set>
      </New>
    </Set>
    
</Configure>