Member_2_5912282
asked on
print my incoming values
Hi Expert
I need to debug some issues related to redirect rules.
for example:
rewritecond  request_uri /xxx
so In the above condition I am passing request_uri . is their anyway to print or echo and capture request_uri incoming data .
this helps to capture values and analyse log.
I need to debug some issues related to redirect rules.
for example:
rewritecond  request_uri /xxx
so In the above condition I am passing request_uri . is their anyway to print or echo and capture request_uri incoming data .
this helps to capture values and analyse log.
ASKER
If you see
RewriteCond %{request_uri} index
I need to capture what values are passing to that variable.
need to print the values parsing by this condition.
RewriteCond %{request_uri} index
I need to capture what values are passing to that variable.
need to print the values parsing by this condition.
Refer to either the Apache 2.2 or 2.4 docs, as logging is different for each version.
Since Apache-2.2 is out of service now, best you stick with Apache-2.4 for all your projects.
So you set your logging to whatever level of detail you require... like...
Which says to log normal Apache requests at the warn level + rewrite at the trace6 level.
https://httpd.apache.org/d ocs/curren t/mod/mod_ rewrite.ht ml#logging provides details about log levels + also how to grep out specific data from log files... as log data for redirect debugging can be massive...
Since Apache-2.2 is out of service now, best you stick with Apache-2.4 for all your projects.
So you set your logging to whatever level of detail you require... like...
LogLevel warn rewrite:trace3
Which says to log normal Apache requests at the warn level + rewrite at the trace6 level.
https://httpd.apache.org/d
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
https://serverfault.com/questions/10796/apache-where-to-examine-the-redirection-logs