from my log
applying pattern '^/h/d/(.*)' to uri /h/d/blah/blah/foo_bar
the next line is
pass through /h/d/blah/blah/foo_bar
shouldnt the rule pickup the line and rewrite the url?
thanx,
bill
any idea on the following rewrite issue
from my log
applying pattern '^/h/d/(.*)' to uri /h/d/blah/blah/foo_bar the next line is pass through /h/d/blah/blah/foo_bar shouldnt the rule pickup the line and rewrite the url? thanx, bill Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 55 years. meep
|
|
Missing $ at end of pattern?
|
|
Waitaminnit
Is the line you're trying to match on
pass through /h/d/blah/blah/foo_bar If that's the case, it's not matching because your regex starts with a caret, so it will only match where the line starts with '/h/d' --
Drew |
|
Huh
It SHOULD match, ie:
I read his post as this is the pat: ^/h/d/(.*) And this is what he's trying to match (he's not great at asking questions, sorry box): /h/d/blah/blah/foo_bar In that case, it SHOULD, except, I'm not sure of the use capturing parenthesis on this regexp (should work fine in perl, I'd need to read up on the web server side), and if not needed, I'd drop them. Also, no anchoring trailing $ should be required. The ".*" should match everything up to the end of the string. |
|
Read him in his posts
the next line is That why I asked what I did. If the line that isn't matching does begin with the string "pass through " as it does in his post, that's why it ain't matching. --
Drew |
|
Calumny!
|
|
oooOOOooo
Sure, understanding today's complex world of the future is a little like having bees live in your head. But...there they are.
|
|
Well box, did I misread?
If so, yup, get rid of the carat.
|
|
Hm. I turned that in "passed through"
As in "the regex didn't match and it passed through unmolested" in English.
|
|
Log formatting.
The text "pass through " is from the logger and is not part of the string being processed.
Wade. Static Scribblings http://staticsan.blogspot.com/
|
|
what he said and crazy, mod_rewrite is perl regex
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 55 years. meep
|
|
Do the slashes need to be escaped?
--
Drew |
|
No. And . will match them as well.
|
|
Stupid question... Is mod_rewrite on at that level?
|
|
My first thought as well.
|
|
yes, it is on as well as the rewrite logging
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 55 years. meep
|
|
Up the log level?
http://martinmelin.s...rite-rule-tester/
Tool pretty much confirms your rule should work as stated so something appears to be interfering with it. |
|
its at 9
but my httpd.conf is 8k lines long, my secondary httpd.conf.secondPort is 4k lines long. I can retire in 9 years it might take me that long to clean it up
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 55 years. meep
|
|
Scratching head...
A quick peek at the logging code shows it will say "pass through" for a number of reasons, not only a failed match.
Processing will be stopped immediately if the NS (ignore on subrequest) or R (force redirect) flags are encountered; P (force proxy) and L (last rule) can also cause it (although I'm not sure of the exact circumstances), and so does using C (chain) on the last rule in a set. A failed RewriteCond will also trigger it. As far as I can see, none of these condition will cause any other log messages to be written. |
|
think I found it
on the machine that works (for various versions of works) it gets caught up in an earlier rule and reroutes. I found by moving it up the order it did what I had asked it to.
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 55 years. meep
|