Re: [users@httpd] RewriteMap substitutions in RewriteRule

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

 



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@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