|
|
|
|
||||||
| alt.apache.configuration Apache web server configuration issues. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi, all.
I've a couple Rewrite rules for my site (an Insurrection/Subversion site) and they work just fine when I add [R] for a redirect, except I really would rather not do that. And when I leave off the redirect, my verbose rewrite log shows that the rule does get carried out, but then passed through, and thus turned into a no-op. What do I do to avert that? Here's the rule: RewriteCond %{REQUEST_METHOD} "^(GET|POST)$" RewriteCond %{QUERY_STRING} "^$" RewriteRule ^/nvs(/.*/)$ "/Insurrection/ls.cgi?Insurrection=ls&HTTPS=%{HTTPS}&Rewritten=ye s&Path=$1" [NE,L] Works as specified when I add an R to the flags, but fails with this in the logs when I neglect to: 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (2) init rewrite engine with requested uri /nvs/faq/ 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (3) applying pattern '^/nvs(/.*)$' to uri '/nvs/faq/' 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (4) RewriteCond: input='GET' pattern='^(GET|POST)$' => matched 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (4) RewriteCond: input='' pattern='Insurrection=(admin|atom|bandwidth|blame| diff|dump|get|log|ls|rss|savelog|uploaddir|upload) ' => not-matched 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (3) applying pattern '^/nvs(/.*/)$' to uri '/nvs/faq/' 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (4) RewriteCond: input='GET' pattern='^(GET|POST)$' => matched 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (4) RewriteCond: input='' pattern='^r([0-9]+)$' => not-matched 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (3) applying pattern '^/nvs(/.*/)$' to uri '/nvs/faq/' 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (4) RewriteCond: input='GET' pattern='^(GET|POST)$' => matched 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (4) RewriteCond: input='' pattern='^$' => matched 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (2) rewrite '/nvs/faq/' -> '/Insurrection/ls.cgi?Insurrection=ls&HTTPS=on&Rewritten=yes&Path =/faq/' 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (3) split uri=/Insurrection/ls.cgi?Insurrection=ls&HTTPS=on&Rewritten=yes&Path =/faq/ -> uri=/Insurrection/ls.cgi, args=Insurrection=ls&HTTPS=on&Rewritten=yes&Path=/faq/ 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (2) local path result: /Insurrection/ls.cgi 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (2) prefixed with document_root to /var/www/html/Insurrection/ls.cgi 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (1) go-ahead with /var/www/html/Insurrection/ls.cgi [OK] 66.35.250.151 - omri [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (1) [perdir /var/www/html/Insurrection/] pass through /var/www/html/Insurrection/ls.cgi Note the last two lines? What gives? Everything is fine, and then there's a pass through. -- Omri Schwarz --- ocschwar@mit.edu Timeless wisdom of biomedical engineering: "Noise is principally due to the presence of the patient." -- R.F. Farr |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On 9 Feb, 06:17, Omri Schwarz <ocsc...@h-after-ocsc.mit.edu> wrote:
> Hi, all. > > I've a couple Rewrite rules for my site (an Insurrection/Subversion site) > and they work just fine when I add [R] for a redirect, except > I really would rather not do that. > > And when I leave off the redirect, my verbose > rewrite log shows that the rule does get carried out, > but then passed through, and thus turned into a no-op. > What do I do to avert that? > > Here's the rule: > > RewriteCond %{REQUEST_METHOD} "^(GET|POST)$" > RewriteCond %{QUERY_STRING} "^$" > RewriteRule ^/nvs(/.*/)$ "/Insurrection/ls.cgi?Insurrection=ls&HTTPS=%{HTTPS}&Rewritten=ye s&Path=$1" [QSA,NE,L] > > Works as specified when I add an R to the flags, but fails with this in the > logs when I neglect to: > > 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (2) init rewrite engine with requested uri /nvs/faq/ > 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (3) applying pattern '^/nvs(/.*)$' to uri '/nvs/faq/' > 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (4) RewriteCond: input='GET' pattern='^(GET|POST)$' => matched > 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (4) RewriteCond: input='' pattern='Insurrection=(admin|atom|bandwidth|blame| diff|dump|get|log|ls|rss|savelog|uploaddir|upload) ' => not-matched > 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (3) applying pattern '^/nvs(/.*/)$' to uri '/nvs/faq/' > 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (4) RewriteCond: input='GET' pattern='^(GET|POST)$' => matched > 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (4) RewriteCond: input='' pattern='^r([0-9]+)$' => not-matched > 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (3) applying pattern '^/nvs(/.*/)$' to uri '/nvs/faq/' > 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (4) RewriteCond: input='GET' pattern='^(GET|POST)$' => matched > 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (4) RewriteCond: input='' pattern='^$' => matched > 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (2) rewrite '/nvs/faq/' -> '/Insurrection/ls.cgi?Insurrection=ls&HTTPS=on&Rewritten=yes&Path =/faq/' > 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (3) split uri=/Insurrection/ls.cgi?Insurrection=ls&HTTPS=on&Rewritten=yes&Path =/faq/ -> uri=/Insurrection/ls.cgi, args=Insurrection=ls&HTTPS=on&Rewritten=yes&Path=/faq/ > 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (2) local path result: /Insurrection/ls.cgi > 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (2) prefixed with document_root to /var/www/html/Insurrection/ls.cgi > 66.35.250.151 - - [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (1) go-ahead with /var/www/html/Insurrection/ls.cgi [OK] > 66.35.250.151 - omri [09/Feb/2007:00:53:22 --0500] [server.mit.edu/sid#88fcdb8][rid#a34ff78/initial] (1) [perdir /var/www/html/Insurrection/] pass through /var/www/html/Insurrection/ls.cgi > > Note the last two lines? What gives? Everything is fine, and > then there's a pass through. > -- > Omri Schwarz --- ocsch...@mit.edu > Timeless wisdom of biomedical engineering: "Noise is principally > due to the presence of the patient." -- R.F. Farr Query String Append? [QSA,NE,L] |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
"shimmyshack" <matt.farey@gmail.com> writes:
> On 9 Feb, 06:17, Omri Schwarz <ocsc...@h-after-ocsc.mit.edu> wrote: > > Hi, all. > > > > I've a couple Rewrite rules for my site (an Insurrection/Subversion site) > > and they work just fine when I add [R] for a redirect, except > > I really would rather not do that. > > > > And when I leave off the redirect, my verbose > > rewrite log shows that the rule does get carried out, > > but then passed through, and thus turned into a no-op. > > What do I do to avert that? > > > > Here's the rule: > > > > RewriteCond %{REQUEST_METHOD} "^(GET|POST)$" > > RewriteCond %{QUERY_STRING} "^$" > > RewriteRule ^/nvs(/.*/)$ "/Insurrection/ls.cgi?Insurrection=ls&HTTPS=%{HTTPS}&Rewritten=ye s&Path=$1" [QSA,NE,L] > > [...] > > Query String Append? > [QSA,NE,L] > Close. PT wound up doing the trick. Thanks, though! -- Omri Schwarz --- ocschwar@mit.edu Timeless wisdom of biomedical engineering: "Noise is principally due to the presence of the patient." -- R.F. Farr |
|
![]() |
| Outils de la discussion | |
|
|