Nginx configuration changes to apache version

could you tell me how to rewrite the following configuration code into a version of Apache or a .htaccess file?
can only write Nginx, Apache can"t.

location /data/coa/ {
     
    if ( $cookie_user_id !~ "\d"  ) {
        rewrite ^/data/coa/(.*)$   http://$host/L37.html;
     } 

}

Thank you

Jun.17,2022

refer to https://stackoverflow.com/que...

RewriteCond %{HTTP_COOKIE} h=\.([1-8]) [NC]
RewriteRule . - [CO=h:.%1:.domain.com:30:/]

RewriteCond is to determine whether cookie
RewriteRule is consistent, set cookie

other parts are not difficult, you can match them by looking up the data

Menu