I wish to redirect an ip to a different look at this site, for instance, I would like the customer from ip x to determine
www.xxx.com?_DEBUG=1
while other site visitors begin to see the normal www.xxx.com, wouldso would I actually do this in apache config file, what directives are utilized?

Here's one particular rewrite configuration to complete what you would like - put this within the virtual host for www.xxx.com in your server:

RewriteCond %{REMOTE_ADDR} 1.2.3.4
RewriteCond %{QUERY_STRING} !_DEBUG=1
#RewriteRule ^/(.*)$ /$1?_DEBUG=1 [QSA,R,L]
RewriteRule ^/(.*)$ /$1?_DEBUG=1 [QSA,L]

A few notes:

  • Change 1.2.3.4 to whatever IP you'll need
  • The 2nd RewriteCond prevents Web addresses already re-written to incorporate _DEBUG=1 from being re-written again
  • You will find two versions from the actual RewriteRule the very first version (said out) really works a redirect. Make use of this should you really want the HTTP client to submit another request towards the server such as the _DEBUG=1 argument. However when you are mixing GET and Publish data, this process won't work.
  • The 2nd version from the RewriteRule is exactly what I suggest you use...it does not execute a redirect. Rather it simply appends the _DEBUG=1 parameter towards the HTTP request internally in Apache prior to the request is handled.