1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

.htaccess AddType addition causes error

Discussion in 'Co-op Advertising Network' started by chachi, Aug 13, 2004.

  1. #1
    Hi gang. Fired up to get the Ad Network rollin'. I added AddType application/x-httpd-php .htm .html to my .htaccess file and it creates a situation where IE asks if I want to open, save or cancel a file download rather than load the .html pages as usual. Searched around the web for a whilie...found people with the same problem, but nobody had a solution that I have seen yet. Anyone have the solution?
     
    chachi, Aug 13, 2004 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    36,434
    Likes Received:
    2,349
    Best Answers:
    400
    Trophy Points:
    710
    Digital Goods:
    27
    #2
    Sounds like your web server doesn't support PHP in that case...
     
    digitalpoint, Aug 13, 2004 IP
  3. chachi

    chachi The other Jason

    Messages:
    1,600
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That is not the case...there are php pages on that site :)

    I am wondering if maybe I need to go into the apache config and do it down there
     
    chachi, Aug 13, 2004 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    36,434
    Likes Received:
    2,349
    Best Answers:
    400
    Trophy Points:
    710
    Digital Goods:
    27
    #4
    Possibly... your setup might not allow certain items to be set within the .htaccess file...
     
    digitalpoint, Aug 13, 2004 IP
  5. chachi

    chachi The other Jason

    Messages:
    1,600
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I'll get to the bottom of this and post the answer here.
     
    chachi, Aug 13, 2004 IP
  6. chachi

    chachi The other Jason

    Messages:
    1,600
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Well, it appears that if SSI is enabled on that server, that you cannot have two "handlers" going at the same time. If you are using server side includes (SSI) with apache, and have added a line:

    AddHandler server-parsed .html

    in your httpd.conf file so that .html files can use SSI, this setting will prevent

    addtype application/x-httpd-php .php .html

    from working (.php will work, but .html won't). So, it appears I need to dump SSI support for .html files if I want to get php to work with .html files. The other thing is, a very good friend just told me that I could not include the php in an include file to begin with. I am taking his word at that as he is pretty darn good at what he does. :)

    So, that is a bummer. I was going to include the php into a sitewide include I already use for some menus. Anyone have any thoughts?
     
    chachi, Aug 13, 2004 IP
  7. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    36,434
    Likes Received:
    2,349
    Best Answers:
    400
    Trophy Points:
    710
    Digital Goods:
    27
    #7
    Or... you could use the SSI/shtml implementation of the ad network. :)
     
    digitalpoint, Aug 13, 2004 IP
  8. chachi

    chachi The other Jason

    Messages:
    1,600
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    0
    #8
    and change all of my file extensions? I believe I was incorrect above in my understanding. php will work in an include on a page with a php extension
     
    chachi, Aug 13, 2004 IP
  9. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    36,434
    Likes Received:
    2,349
    Best Answers:
    400
    Trophy Points:
    710
    Digital Goods:
    27
    #9
    Right... You can include a PHP file within a PHP file.
     
    digitalpoint, Aug 13, 2004 IP
  10. bee bird

    bee bird Banned

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Addtype application/x-httpd-php .php .html

    I try to put that code also in my .htaccess, everything works fine, my hmtl file now works with embeded php code on it:D :D :D
     
    bee bird, Aug 1, 2006 IP
  11. Cudbwrse

    Cudbwrse Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    You can always do a site wide search and replace and turn all the SSI into php includes? I just did that myself.
     
    Cudbwrse, Aug 1, 2006 IP
  12. waelthmastery

    waelthmastery Peon

    Messages:
    64
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Hi can somebody post teh complete command please?

    The original one is

    "addtype application/x-httpd-php .php .html "

    where does SSI/shtml come in?
     
    waelthmastery, Aug 2, 2006 IP