httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony VanScoy <tvans...@gmail.com>
Subject Re: [users@httpd] RewriteMap substitutions in RewriteRule
Date Fri, 12 Aug 2005 16:52:05 GMT
As a testing purpose I changed my mapping script to this ...

<?php
echo "somefile.php\n";
?>

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 boots me to .

/pdf/

... instead of ...

/pdf/somefile.pdf

shit. well one good thing is that I moved the rewritelog stuff to the
virtual host and im finally getting something. looks like the value is
not being sent.

Here's my first request to the url, this one works...

(2) init rewrite engine with requested uri /test.php
(3) applying pattern '^/test\.php$' to uri '/test.php'
(4) RewriteCond: input='pdfId=76' pattern='^pdfId\=\d+$' => matched
(5) map lookup OK: map=fileName key= -> val=somefile.pdf
(2) rewrite /test.php -> /pdf/somefile.pdf?
 (3) split uri=/pdf/somefile.pdf? -> uri=/pdf/somefile.pdf, args=<none>
(2) explicitly forcing redirect with http://www.example.local/pdf/somefile.pdf
(1) escaping http://www.example.local/pdf/somefile.pdf for redirect
(1) redirect to http://www.example.local/pdf/somefile.pdf [REDIRECT/302]

.. and then right after that one works, i make the same exact request
and i get ...
(2) init rewrite engine with requested uri /test.php
(3) applying pattern '^/test\.php$' to uri '/test.php'
(4) RewriteCond: input='pdfId=76' pattern='^pdfId\=\d+$' => matched
(5) map lookup OK: map=fileName key= -> val=
(2) rewrite /test.php -> /pdf/?
(3) split uri=/pdf/? -> uri=/pdf/, args=<none>
(2) explicitly forcing redirect with http://www.example.local/pdf/
(1) escaping http://www.example.local/pdf/ for redirect
(1) redirect to http://www.example.local/pdf/ [REDIRECT/302]

... wtf?!

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message