if ($host ~* "^([^.]+(.[^.]+)*).([a-zA-Z1-9-_]+).([a-zA-Z]+)/favicon.ico(/?)+$")

Hello Designers.

I have to configure my favicon.ico for multiple sites. The above mentioned code has some problems and doesn't work. What ought to be done to attain me?

Thanks

if ($host ~* "^([a-zA-Z1-9-_]+.)([a-zA-Z1-9-_]+).([a-zA-Z]+)$")

this code works now. can there be every other solution?