Re: RewriteMap questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 31 May 2007 11:02:54 -0400
"Joshua Slive" <joshua@xxxxxxxx> wrote:

> On 5/31/07, Josh Trutwin <josh@xxxxxxxxxxxxxxxxxxx> wrote:
> 
> > One last problem I seem to be having is how the program returns
> > NULL
> > - I have this when the program finds a match in the map file:
> >
> > fputs(STDOUT, $map[$uri] . "\n");
> >
> > When it doesn't find a match though I have it doing this:
> >
> > fputs(STDOUT, "NULL");
> >
> > Which seemed the correct thing to do per the docs.  The request
> > hangs even though the program has output buffering turned off too.
> 
> I haven't played much with program rewritemaps, but I'd guess that
> the NULL needs a \n as well.

That was my first guess, but when I do that I get continuous
rewriting and the dreaded "maximum number of internal redirects
reached". 

BUT, I was able to fix this by updating the rewriterule to:

RewriteRule .*
${rewriter:%{REQUEST_FILENAME}^%{REQUEST_URI}|/custom/404.php} [L,QSA]

> By the way, what do you expect apache to do with the empty
> rewritemap result? I think you are better off rewriting to some
> default URL in this case.

Is that basically what I just did?  :)

Josh

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux