You probably know this, but just in case: HTTP_REFERER will always be empty if you type a page address in the browser rather than following a link, so make sure you're following a link when testing.
You might be able to do something goofy with a forwarding page, like having .htaccess forward the user to an intermediate page which captured the HTTP_REFERER, saved it in a $_SESSION variable, and forwarded the user to the real target page where you could grab the $_SESSION variable. I'm not sure it would work.