1

In Apache I am trying to emulate the RewriteLog behaviour with a sub-request pointing to a simple cgi script

According to Apache 2.2 documentation:

%{LA-U:variable} can be used for look-aheads which perform an internal (URL-based) sub-request to determine the final value of variable. This can be used to access variable for rewriting which is not available at the current stage, but will be set in a later phase.

%{LA-F:variable} can be used to perform an internal (filename-based) sub-request, to determine the final value of variable. Most of the time, this is the same as LA-U above.

According to a mail archive conversation in the case of using %{LA-F:variable} the request is passed directly to the next processing stage:

usr/local/webserver/doc_root/some/dir/som_file

cat /dev/world | perl -e "while (<>) {(/(^.*? \?) 42 \!/) && (print $1)}"
errors->(c)

but how to implement %{LA-U:variable} or %{LA-F:variable} in .htaccess?

hjpotter92
  • 78,589
  • 36
  • 144
  • 183
RafaSashi
  • 16,483
  • 8
  • 84
  • 94
  • _“In Apache I am trying to emulate the RewriteLog behaviour with a sub-request pointing to a simple cgi script”_ – that does not sound like a good idea; it will likely falsify the results you will be getting or at least add additional noise. I assume you want to do this because you do not have sufficient access to actually enable rewrite logging? In that case, you should rather ask the server admin to do it for you, or set up a test system of your own where you are in full control. – CBroe May 01 '15 at 01:47
  • I have full access but I d'like to use differente path depending on the request more like a tracker actually. I have also formulated this question because it is part of the apache set of tools and there is no example about how to use it. – RafaSashi May 01 '15 at 07:47

0 Answers0