Configuring Apache HTTP Server based on web browser

less than 1 minute read

You can configure Apache HTTP Server’s response header based on web browser. Example is below.

# httpd.conf
<If “%{HTTP_USER_AGENT} =~ /Chrome/“>
    Header set blah blah
</If>
<ElseIf “%{HTTP_USER_AGENT} =~ /Safari/“>
    Header set whoolah whoolah 
</ElseIf>

20210915

Leave a comment