I’m trying to a build a .htaccess file with some rewrite rules and would like to know what several variables actually contain when my request is handled. Is there anyway of seeing what their values would be when Apache handles the request?
E.g. print the contents of %{HTTP_USER_AGENT}
Sure. Create this sort of .php file (echo.php):
Add this rule in .htaccess:
Add more parameters if necessary.
Now call any URL and check the output (the GET parameters should be on the top of table).
But, TBH, almost all of this info is received by Apache and is available to PHP anyway: look at
$_SERVER.