0

I have URL http://foo.com/bar?abc=123, what would be the correct entry in the htaccess file to return a simple text 200 status of abc=123? Basically, I just want to return the entire query string as simple text.

I know return ing text is possible because I have used it with ErrorDocument before, and I know accessing the query is possible with QUERY_STRING, I just don't know how to combine the two in a RewriteRule.

coneybeare
  • 621
  • 1
  • 7
  • 14

1 Answers1

0

I was hoping to do this with Apache, but I did find a simple way with php.

<?php
   echo $_SERVER["QUERY_STRING"];  // Given GET /foo/bar?query, output: query
?>
coneybeare
  • 621
  • 1
  • 7
  • 14