Forum Discussion

JoshBecigneul's avatar
Sep 11, 2013

Modify APM webtop favicon.ico

Hi All,

Can anyone give me their thoughts on customizing the favicon.ico file that APM provides? Right now it is the same for every service on the device, and I would like to be able to modify it on a per-access profile basis. I have attempted to try and do it via an iRule, but so far have only had some luck with APM in the way. I'm running 11.3.0 hf 6 and 11.4.0 hf3.

I see the original file at /usr/local/www/sam/webtop/favicon.ico, but I want to be able to override it altogether. For reference, I have uploaded a different file as an iFile called squares-favicon.

Here is my iRule attempting to replace the file. This worked until APM was added to the mix.

when HTTP_REQUEST {
    if { [HTTP::uri] eq "/favicon.ico" } {
        log local0. "Requested favicon"
        HTTP::respond 200 content [ifile get squares-favicon]
    }
}

Next I tried to add the ACCESS::restrict_irule_events command to try and work around it. This never really worked right either.

when CLIENT_ACCEPTED {
    ACCESS::restrict_irule_events disable
}
when HTTP_REQUEST {
    if { [HTTP::uri] eq "/favicon.ico" } {
        log local0. "Requested favicon"
        HTTP::respond 200 content [ifile get squares-favicon]
    }
}

Next I tried including the following in header.inc using the advanced customization editor, and modifying the iRule above to reflect the proper path (the URL below contains the IP of the VIP this is running on). This seems to work for Firefox but not Chrome or IE.

Is there a way to customize the content between the head tags in an access profile? The highest I seem to be able to insert this tag is just after the head tags.

This definitely is a pretty janky solution so far. Hopefully someone can come up with something usable!

Thanks.

  • Interesting. So this doesn't work for you?

    when CLIENT_ACCEPTED {
        ACCESS::restrict_irule_events disable 
    }
    when HTTP_REQUEST {
        if { [HTTP::uri] equals "/favicon.ico" } {
            HTTP::respond 200 content [ifile get my_favicon] "Content-Type" "image/x-icon"
        }
    }
    

    I testing this successfully on 11.3 HF5

    Any chance the favicon you're using is unsupported?