Link to home
Start Free TrialLog in
Avatar of Member_2_5912282
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.
Avatar of Rahul Shende
Rahul Shende

Avatar of Member_2_5912282

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

LogLevel warn rewrite:trace3

Open in new window


Which says to log normal Apache requests at the warn level + rewrite at the trace6 level.

https://httpd.apache.org/docs/current/mod/mod_rewrite.html#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...
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members 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.