Try our conversational search powered by Generative AI!

Images using default favicon for all websites

Vote:
 

Hi,

I have multiple websites and added diffrernt favicons for each websites and its working fine also. But when open any imgae in new tab from any of the website it is using default favicon "favicon.ico". I need to use website specific favicon for images also.

Please assist with this.

#271486
Feb 10, 2022 15:45
Vote:
 

I don't know if it's the easiest solution but I would add url rewrite to the web.config and serve different favicon files based on the requested domain. Something like below. Not tested.

	  <rewrite>
		  <rules>
			  <clear />
			  <rule name="site1.com/favicon.ico">
				  <match url="^favicon.ico$" />
				  <conditions>
					  <add input="{HTTP_HOST}" pattern="site1.com" />
				  </conditions>
				  <action type="Rewrite" url="https://www.site1.com/favicon-site1.ico" />
			  </rule>
			  <rule name="site2.com/favicon.ico">
				  <match url="^favicon.ico$" />
				  <conditions>
					  <add input="{HTTP_HOST}" pattern="site2.com" />
				  </conditions>
				  <action type="Rewrite" url="https://www.site2.com/favicon-site2.ico" />
			  </rule>
		  </rules>
	  </rewrite>
#271490
Edited, Feb 10, 2022 20:26
- Feb 11, 2022 6:59
Thanks for your reply Tomas, I am using the rules for differetn sites as below, but still the favicon for images(if we open the images in new tab) is not website specific.



Tomas Hensrud Gulla - Feb 11, 2022 8:31
What rules below?
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.