Forum Moderators: phranque
I can't seem to do this using mod_rewrite - its frustrating! I am doing a RewriteCond %{REQUEST_URI} (expression) and I want to know what it is getting, so I can refine my regular expression.
I've tried doing RewriteLog "/path/rewrite.log" etc but this causes Error 500. Does this file need to already exist?
Sorry if these are really basic questions but trying to learn!
RewriteRule ^foo\.html$ /bar.html?HTTP_HOST=%{HTTP_HOST}&REQUEST_URI=%{REQUEST_URI} [R=301,L]
<p>HTTP_Host: <!--#echo var="HTTP_HOST" -->
<br>Request_URI: <!--#echo var="REQUEST_URI" --></p>
Jim
Maybe I noticed while looking through code many weeks later, or maybe I found it as a result of some garbage in the server logs.
Whatever. Do as much testing as you can. It will pay off in having a more reliable site.