I have a rewrite to make mydomain.com/123 load the script at mydomain.com/links.php?id=123
links.php generates html with some links on the page. the links are supposed to have the referring url appended to them in the query string ( eg http://whatever.com/s.php?ref=<?=$_SERVER['HTTP_REFERER'];?> ), but it's always blank no matter what.
would the rewrite cause HTTP_REFERER to be blanked out? what else might cause this?
Code:
RewriteEngine on
Options +FollowSymlinks
RewriteCond %{HTTP_HOST} ^www\.mydomain.com [NC]
RewriteRule ^(.*) http://mydomain.com/$1 [L,R=301]
RewriteCond %{REQUEST_URI} !^/$
RewriteCond %{REQUEST_URI} !^/links\.php
RewriteCond %{REQUEST_URI} !^/robots\.txt
RewriteRule ^(.*)$ links.php?id=$1 [L]