.htaccess replace/change banner for IE/opera/ff

Discussion in 'HTML & Website Design' started by cosy, Aug 20, 2009.

  1. #1
    is there any way to replace a banner whit other banner if the user have a different browser ?
    if this can be done whit .htaccess will be awesome :)
     
    cosy, Aug 20, 2009 IP
  2. SearchBliss

    SearchBliss Well-Known Member

    Messages:
    1,899
    Likes Received:
    70
    Best Answers:
    2
    Trophy Points:
    195
    Digital Goods:
    1
    #2
    I don't think this can be done with .htaccess, but you can use a javascript browser sniffer to do this. Just search Google.
     
    SearchBliss, Aug 20, 2009 IP
  3. AssistantX

    AssistantX Peon

    Messages:
    173
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Though I recommend using PHP to do this instead, you may be able to use and change the code below to fit your needs. Do a few searches on "RewriteCond ${HTTP_USER_AGENT}" and see if you can devise a way to create what your looking for.
    
    RewriteEngine on
    RewriteCond ${HTTP_USER_AGENT} BrowserHere
    RewriteRule .* http://www.websitehere.com
    
    Code (markup):
     
    AssistantX, Aug 20, 2009 IP