This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: set cookie based on subdomain
Author
Message |
pbroussard
Newbie


Joined: 19 November 2007
Posts: 7
Posted: 30 January 2012 at 4:05pm

 I have several subdomains pointed at one site in IIS. I need to set a cookie based on the subdomain using rewritemap.

the map file has this
bills. 123
gary. 735
butch. 787

My rewriteRule
RewriteMap mymap txt:E:/www/ISAPI_ReWriteFiles/a.com.txt
RewriteMap mylower int:tolower
RewriteCond %{HTTP:Host} (.*([\.]?))a\.com
RewriteCond ${mymap:${mylower:%1}|NOT_FOUND} !NOT_FOUND
RewriteRule .? - [cookie|CO=dealer:${mymap:${mylower:%1}}:.a.com:7200:/]

Here are the log files.
127.0.0.1 127.0.0.1  Mon, 30-Jan-2012  16:09:08 GMT [a.a.com/sid#1024381540][rid#21307328/initial] (2) init rewrite engine with requested uri /
127.0.0.1 127.0.0.1  Mon, 30-Jan-2012  16:09:08 GMT [a.a.com/sid#1024381540][rid#21307328/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf
127.0.0.1 127.0.0.1  Mon, 30-Jan-2012  16:09:08 GMT [a.a.com/sid#1024381540][rid#21307328/initial] (1) Htaccess process request e:\www\atestsite\.htaccess
127.0.0.1 127.0.0.1  Mon, 30-Jan-2012  16:09:08 GMT [a.a.com/sid#1024381540][rid#21307328/initial] (3) applying pattern '.?' to uri ''
127.0.0.1 127.0.0.1  Mon, 30-Jan-2012  16:09:08 GMT [a.a.com/sid#1024381540][rid#21307328/initial] (4) RewriteCond: input='a.a.com' pattern='(.*([\.]?))a\.com' => matched
127.0.0.1 127.0.0.1  Mon, 30-Jan-2012  16:09:08 GMT [a.a.com/sid#1024381540][rid#21307328/initial] (5) map lookup OK: map=m[txt] key=a. -> val=a.
127.0.0.1 127.0.0.1  Mon, 30-Jan-2012  16:09:08 GMT [a.a.com/sid#1024381540][rid#21307328/initial] (5) map lookup OK: map=m[txt] key=a. -> val=111
127.0.0.1 127.0.0.1  Mon, 30-Jan-2012  16:09:08 GMT [a.a.com/sid#1024381540][rid#21307328/initial] (4) RewriteCond: input='111' pattern='NOT_FOUND' => matched
127.0.0.1 127.0.0.1  Mon, 30-Jan-2012  16:09:08 GMT [a.a.com/sid#1024381540][rid#21307328/initial] (1) Rewrite URL to >> /
127.0.0.1 127.0.0.1  Mon, 30-Jan-2012  16:09:08 GMT [a.a.com/sid#1024381540][rid#21307328/initial] (2) rewrite '' -> '/'
127.0.0.1 127.0.0.1  Mon, 30-Jan-2012  16:09:08 GMT [a.a.com/sid#1024381540][rid#21307328/initial] (2) internal redirect with / [INTERNAL REDIRECT]

127.0.0.1 127.0.0.1  Mon, 30-Jan-2012  16:09:08 GMT [a.a.com/sid#1024381540][rid#21307328/initial] (2) init rewrite engine with requested uri /CFIDE/debug/images/topdoc.gif
127.0.0.1 127.0.0.1  Mon, 30-Jan-2012  16:09:08 GMT [a.a.com/sid#1024381540][rid#21307328/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf
127.0.0.1 127.0.0.1  Mon, 30-Jan-2012  16:09:08 GMT [a.a.com/sid#1024381540][rid#21307328/initial] (1) Htaccess process request e:\www\atestsite\.htaccess
127.0.0.1 127.0.0.1  Mon, 30-Jan-2012  16:09:08 GMT [a.a.com/sid#1024381540][rid#21307328/initial] (3) applying pattern '.?' to uri 'CFIDE/debug/images/topdoc.gif'
127.0.0.1 127.0.0.1  Mon, 30-Jan-2012  16:09:08 GMT [a.a.com/sid#1024381540][rid#21307328/initial] (4) RewriteCond: input='a.a.com' pattern='(.*([\.]?))a\.com' => matched
127.0.0.1 127.0.0.1  Mon, 30-Jan-2012  16:09:08 GMT [a.a.com/sid#1024381540][rid#21307328/initial] (5) map lookup OK: map=m[txt] key=a. -> val=a.
127.0.0.1 127.0.0.1  Mon, 30-Jan-2012  16:09:08 GMT [a.a.com/sid#1024381540][rid#21307328/initial] (5) map lookup OK: map=m[txt] key=a. -> val=111
127.0.0.1 127.0.0.1  Mon, 30-Jan-2012  16:09:08 GMT [a.a.com/sid#1024381540][rid#21307328/initial] (4) RewriteCond: input='111' pattern='NOT_FOUND' => matched
127.0.0.1 127.0.0.1  Mon, 30-Jan-2012  16:09:08 GMT [a.a.com/sid#1024381540][rid#21307328/initial] (1) Rewrite URL to >> /CFIDE/debug/images/topdoc.gif
127.0.0.1 127.0.0.1  Mon, 30-Jan-2012  16:09:08 GMT [a.a.com/sid#1024381540][rid#21307328/initial] (2) rewrite 'CFIDE/debug/images/topdoc.gif' -> '/CFIDE/debug/images/topdoc.gif'
127.0.0.1 127.0.0.1  Mon, 30-Jan-2012  16:09:08 GMT [a.a.com/sid#1024381540][rid#21307328/initial] (2) internal redirect with /CFIDE/debug/images/topdoc.gif [INTERNAL REDIRECT]



Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version