Click to See Complete Forum and Search --> : symbolic link -> link tracker.cgi


goofball
06-06-2003, 01:07 PM
In order to track the click-thru & other response rates to a mass-email newsletter, all the links within that email look like this:
http://www.domain.com/cgi-bin/mail/newsletters/track.cgi?link=2345&logfile=2345&email=234

Those url's get annoying, especially if you don't want to rub it in your subscribers faces that your tracking every click they make. I needed a shorter url, so I used a symbolic link that points to that "track.cgi" file.

The problem is, when I click the href to that symbolic link, the browser displays the contents of the tracking script, instead of executing the script. I'm sure this has to do with the fact that the symbolic link lies outside the cgi-bin, but I want to keep it where is is if possilbe.

I'm using a UNIX-based server. Any suggestions?

Thanks!

goofball
06-12-2003, 01:34 PM
I just figured it out myself

in the .htaccess file, right after the RewriteRule arguments,
you have to add the [L] flag so the machine knows that it's the (L)ast argument that needs to be evaluated.

so the .htaccess file looks like this:
RewriteEngine On
RewriteRule ^link ../../cgi-bin/mail/newsletters/track.cgi [L]


I hope this comes in useful to somebody!