Does anyone have a solution to the following:
1. Surfer calls site. Site creates cookie: user=value. For example: user=12345
2. File also created on server named as cookie value. For example: 12345.dat
3. If user calls specific directory (any file, or nested subdirectory), cookie retrieved by server. If cookie value not found to exist as file (e.g., 12345.dat), user redirected to specific URL.
This has to be handled per directory via .htaccess. I'm thinking using the Apache SetEnvIf directive in conjunction with Rewrite. Something like:
SetEnvIf Cookie ".*user=(.*)" user=$1
RewriteEngine on
RewriteCond /full/path/to/data/${ENV:user} !-f
RewriteRule /* /some_page.html [L,R]
However, this does not work. Any suggestions from the Apache gurus?
Cheers - Dan
----
Cheers,
Dan
Founder and CEO
LionsGate Creative
GoodPassRobot
Magelln
1. Surfer calls site. Site creates cookie: user=value. For example: user=12345
2. File also created on server named as cookie value. For example: 12345.dat
3. If user calls specific directory (any file, or nested subdirectory), cookie retrieved by server. If cookie value not found to exist as file (e.g., 12345.dat), user redirected to specific URL.
This has to be handled per directory via .htaccess. I'm thinking using the Apache SetEnvIf directive in conjunction with Rewrite. Something like:
SetEnvIf Cookie ".*user=(.*)" user=$1
RewriteEngine on
RewriteCond /full/path/to/data/${ENV:user} !-f
RewriteRule /* /some_page.html [L,R]
However, this does not work. Any suggestions from the Apache gurus?
Cheers - Dan
----
Cheers,
Dan
Founder and CEO
LionsGate Creative
GoodPassRobot
Magelln