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:/]
表示
返信
いいね!の合計
Hi @ShyamSundar ,
RewriteEngine On
# Set userRegion and userRegionDispatcher together if not set
RewriteCond %{HTTP:x-aem-client-country} ^(us|in)$ [NC]
RewriteCond %{HTTP_COOKIE} !userRegion= [NC]
RewriteRule ^ - [CO=userRegion=%1:31557600:/:Secure,CO=userRegionDispatcher=samplecookie:31557600:/]
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,CO=userRegionDispatcher=samplecookie:31557600:/]
# Ensure userRegionDispatcher is set separately if missing
RewriteCond %{HTTP_COOKIE} !userRegionDispatcher= [NC]
RewriteRule ^ - [CO=userRegionDispatcher=samplecookie:31557600:/]
# Ensure Dispatcher allows cookies
<IfModule mod_headers.c>
Header always edit Set-Cookie "(?i)^userRegionDispatcher=" "$0; SameSite=None"
</IfModule>
Can you try with the below code?
@Rohit_Utreja Tried whatever dispatcher rewrite rule given. No luck bro.
Still I don't find the userRegionDispatcher cookie set in the dispatcher domain
表示
返信
いいね!の合計
try with below
RewriteRule ^ - [CO=userRegionDispatcher=samplecookie:31557600:/:Secure;SameSite=None]
Still the same problem bro.
表示
返信
いいね!の合計
Can you try adding secure flag to the rule as below
RewriteRule ^ - [CO=userRegionDispatcher=samplecookie:31557600:/:Secure]
@AMANATH_ULLAH - Tried this rewrite rule which did not work either
RewriteRule ^ - [CO=userRegionDispatcher=samplecookie:31557600:/:Secure]
表示
返信
いいね!の合計
@ShyamSundar Did you find the suggestions helpful? Please let us know if you need more information. If a response worked, kindly mark it as correct for posterity; alternatively, if you found a solution yourself, we’d appreciate it if you could share it with the community. Thank you!
表示
返信
いいね!の合計