http rewrite for favicon

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
markosjal
Forum Commoner
Posts: 63
Joined: Fri Apr 16, 2010 10:15 pm

http rewrite for favicon

Post by markosjal »

Hello,

I have a server up and running with a domain and a subdomain. Depending on how one goes in , it loads a different identity. Now all I need to do is to load a favicobn bases on whether5 they are looking for abc.mydomain.com/favicon.ico

WHereas if they go to mydomain.com or www.mydomain.com, the default favicon.ico would be loaded

I think I need
RewriteCond
but am not sure how to do this .

I think the http rewrite will look at the (sub) domain, correct?

I was going to do this in php but this seems to make more sense , does it not?

thanks for any help in advance
User avatar
tr0gd0rr
Forum Contributor
Posts: 305
Joined: Thu May 11, 2006 8:58 pm
Location: Utah, USA

Re: http rewrite for favicon

Post by tr0gd0rr »

You probably want to use HTML to include different favicons. Putting the following HTML in the <head> will load favicon.ico from any location you wish.

Code: Select all

<link rel="SHORTCUT ICON" href="/abc/favicon.ico">
markosjal
Forum Commoner
Posts: 63
Joined: Fri Apr 16, 2010 10:15 pm

Re: http rewrite for favicon

Post by markosjal »

Unfortunately this will mean that I must use different <head> sections thereby using PHP as I said, the mod rewrite seemed to make more sense than turning the headers themselves into variables called by (sub)domain

to clarify when a person is at abc.mydomain I want them to see one favicon, and when at mydomain.com I want them to see a different one

The example you showed is the basic favicon code.

I need a mod rewite based on the (sub)domain the visitor is at.
Post Reply