Re: [EMAIL PROTECTED] Which file gets served when the URL does not include a mime type extension.

2005-08-24 Thread Tony VanScoy
> If I have a directory "test" with two files in "file.xml" and > "file.html" can anyone tell me which should get served if I address it > from a browser using > > "http://localhost/test/file"; > > i.e. without specifying the suffix. > > also is this behaviour configurable? > > thanks, > >

[EMAIL PROTECTED] Determining incoming request size

2005-08-23 Thread Tony VanScoy
Is it possible to get the size of an incoming request? If so, how reliable is it? I was thinking of using Content-Length, but I thought I read somewhere that it's up to the browser to set that value. I need to know for sure because I want to be able to grab incoming requests and do something depend

Re: [EMAIL PROTECTED] RewriteMap and sending more then 1 var

2005-08-19 Thread Tony VanScoy
Well I added set my flags back to [R,L]. I didn't have any other rewrite rules that would have matched, but it's the right thing to do. I left the [T=application/pdf] because it wouldn't be used since it's an external redirect. However, I compensated for this with a Location/Header config ...

Re: [EMAIL PROTECTED] RewriteMap and sending more then 1 var

2005-08-18 Thread Tony VanScoy
On 8/18/05, Axel-Stéphane SMORGRAV <[EMAIL PROTECTED]> wrote: > A redirection (HTTP 302 or friends) does not return any contents. It merely > directs the browser to request another URL which will hopefully return the > PDF document. That response should contain the header "Content-Type: > appli

Re: [EMAIL PROTECTED] RewriteMap and sending more then 1 var

2005-08-18 Thread Tony VanScoy
> Just one thing: why do you set the Content-Type [T] of a redirect [R]?? > > -ascs Because I'm new and I don't know any better. I figure that since I'm sending a PDF, why not set the type? Am I wrong for doing this? - The offic

Re: [EMAIL PROTECTED] RewriteMap and sending more then 1 var

2005-08-17 Thread Tony VanScoy
> Have you tried it? What happened? It worked after a few modifications > Your idea is basically fine, except you should pick a character other than > |, because that character is special in a rewritemap (used to > designate a default value). (Perhaps it doesn't matter if it is in > quotes; I'v

[EMAIL PROTECTED] RewriteMap and sending more then 1 var

2005-08-17 Thread Tony VanScoy
Thanks to the help of a number of people here. I've gotten RewriteMap to work like a charm. My question is about the variables being sent to the processing program. Right now I'm using syntax like the following line ... RewriteMap pdfFile prg:/home/user/getPDF.php .. and I use that program to ma

Re: [EMAIL PROTECTED] RewriteMap substitutions in RewriteRule

2005-08-15 Thread Tony VanScoy
Thanks for all the help, I've got it working! RewriteEngine On RewriteLog "/var/log/httpd/rewrite_log" RewriteLogLevel 1 RewriteMap fileName prg:/home/trion/getFilename.php RewriteCond %{QUERY_STRING} ^fileId\=(\d+)$ RewriteRule ^/getfile\.php$ /pdf/

Re: [EMAIL PROTECTED] RewriteMap substitutions in RewriteRule

2005-08-12 Thread Tony VanScoy
OK, i got my script looping on STDIN, but now I have a problem with backreferences to the RewriteCond. My condition is this... RewriteCond %{QUERY_STRING} ^pdfId\=\d+$ .. but thanks to Noah <[EMAIL PROTECTED]> and the manual, i found that If I want to use %1 to reference the id being passed then

Re: [EMAIL PROTECTED] RewriteMap substitutions in RewriteRule

2005-08-12 Thread Tony VanScoy
> I'm afraid you may have caugt a slight case of > not-reading-the-documentation-carefully-enough-itis. Unfortunately, > when dealing with mod_rewrite, this affliction can be deadly. > > If you look carefully at the example map program here: > http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html

Re: [EMAIL PROTECTED] RewriteMap substitutions in RewriteRule

2005-08-12 Thread Tony VanScoy
As a testing purpose I changed my mapping script to this ... so no matter what I send, it outputs a filename + newline to stdout. i didn't have the newline character before, so i restarted the server and tested. great, it works. now try the same url again and it doesn't output a filename, just b

Re: [EMAIL PROTECTED] RewriteMap substitutions in RewriteRule

2005-08-12 Thread Tony VanScoy
> > Use %1 for back-references to RewriteCond. $1 is a back-reference to > > the RewriteRule. > > Additionally, backreferences aren't populated unless the string you want > to capture is in parentheses. > > --n > > -- > Neil! Your bed's on fire So I have to use ... RewriteCond %{QUERY_STRING}

Re: [EMAIL PROTECTED] RewriteMap substitutions in RewriteRule

2005-08-12 Thread Tony VanScoy
On 8/12/05, Joshua Slive <[EMAIL PROTECTED]> wrote: > On 8/12/05, Tony VanScoy <[EMAIL PROTECTED]> wrote: > > First here is my config for a VirtualHost > > > > # map id's to actualy filenames > > RewriteMap fileName prg:/home/user/getFileName.php

[EMAIL PROTECTED] RewriteMap substitutions in RewriteRule

2005-08-12 Thread Tony VanScoy
First here is my config for a VirtualHost # map id's to actualy filenames RewriteMap fileName prg:/home/user/getFileName.php # catch any pdfId as long as it's an integer RewriteCond %{QUERY_STRING} ^pdfId\=\d+$ # only rewrite for test.php, but substitute the entire URL+QUERY_STRING with the file

Re: [EMAIL PROTECTED] mod_rewrite question, escaping quantifiers

2005-08-12 Thread Tony VanScoy
I got it. RewriteCond %{QUERY_STRING} ^file\=12$ RewriteRule ^/test\.php$ /pdf/somfile.pdf [R,L,T=application/pdf] Looks like i needed regex in the RewriteCond. Thanks. - The official User-To-User support forum of the Apache HT

Re: [EMAIL PROTECTED] mod_rewrite question, escaping quantifiers

2005-08-12 Thread Tony VanScoy
> > RewriteEngine On > RewriteCond ${QUERY_STRING} "file" > RewriteRule ^/test\.php$ /index.php [R] > Well i fixed my typo ${QUERY_STRING}, it should be %{QUERY_STRING}. But still not working. - The official User-To-User suppor

Re: [EMAIL PROTECTED] mod_rewrite question, escaping quantifiers

2005-08-12 Thread Tony VanScoy
> > I want to redirect certain requests to a pdf depending on a get > > variable. nothing new, but I just can't get it to work. So I started > > with the basics but just redirecting a certain page to a pdf, which > > works. > > > > RewriteRule ^/test\.php$ /pdf/somefile.pdf$ [R,T=application/pdf] >

[EMAIL PROTECTED] mod_rewrite question, escaping quantifiers

2005-08-11 Thread Tony VanScoy
I want to redirect certain requests to a pdf depending on a get variable. nothing new, but I just can't get it to work. So I started with the basics but just redirecting a certain page to a pdf, which works. RewriteRule ^/test\.php$ /pdf/somefile.pdf$ [R,T=application/pdf] Which works fine. But,