Forum Moderators: DixonJones

Message Too Old, No Replies

.htaccess to set cookie with http referer

         

jarvster

6:43 pm on Dec 5, 2002 (gmt 0)

10+ Year Member



I have a clients site which is hosted on Apache and we currently use a htaccess file for custom error pages.

What I want to do is set a cookie when a new visitor comes to the site and record the http referrer so that this can be picked up in the php enquiry form.

Can this be done in the .htacess file?
Many of the pages are .html, otherwise we could do it with PHP quite easily.

andreasfriedrich

8:31 pm on Dec 5, 2002 (gmt 0)

jarvster

11:12 pm on Dec 5, 2002 (gmt 0)

10+ Year Member



Thanks - but this doesn't really help.
The examples are about writing headers, I need to read the referer header and set a cookie with it's value.

Anyone else know if this can be done?