Problem with the AEM dispatcher rewrite rules
We are trying to set the cookie userRegionDispatcher when the dispatcher domain
(https://dev-aem-www.samplerm.org/home) gets loaded but that's actually not happening.
Please find the below rewrite rules from the dispatcher.
We don't see any effect with the code(last line of the code piece) we have added.
Can someone help us out on the problem.
#################################################
## Rules for setting up userRegion cookie at the starting
#################################################
# For 'us' or 'in' country codes
RewriteCond %{HTTP:x-aem-client-country} ^(us|in)$ [NC]
RewriteCond %{HTTP_COOKIE} !userRegion= [NC]
RewriteRule ^ - [CO=userRegion=%1:31557600:/:Secure]
# For 'mena' countries
RewriteCond %{HTTP:x-aem-client-country} ^(DZ|DZA|BH|BHR|KM|COM|DJ|DJI|EG|EGY|IQ|IRQ|JO|JOR|KW|KWT|LB|LBN|LY|LBY|MA|MAR|MR|MRT|OM|OMN|PS|PSE|QA|QAT|SA|SAU|SO|SOM|SD|SDN|SY|SYR|TN|TUN|AE|ARE|YE|YEM)$ [NC]
RewriteCond %{HTTP_COOKIE} !userRegion= [NC]
RewriteRule ^ - [CO=userRegion=mena:31557600:/:Secure]
#################################################
## Trying to set up a userRegionDispatcher
#################################################
RewriteRule ^ - [CO=userRegionDispatcher=samplecookie:31557600:/]