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.

ForceType Directive...

Discussion in 'Co-op Advertising Network' started by duncancarver, Dec 5, 2004.

  1. #1
    Hi All,

    I've just signed up for the co-op and look forward to adding 500k+ additional pages to the network for everyone however I'm having trouble getting setup. The script I am using to run our sites uses the ForceType directive to display dynamically generated pages from a MYSQL database as .htm pages. The .htaccesss file looks like this...

    <files articles>
    ForceType application/x-httpd-php

    <files news>
    ForceType application/x-httpd-php

    I tried adding...

    .php .htm .html
    ...to the end of the ForceType line but it converted all pages into 500 errors so that didn't work. Is there anyway around this? The sites are already well established so changing them to be .shtml is no a realistic option. TIA.


    Duncan Carver
    duncancarver, Dec 5, 2004 IP
  2. nevetS

    nevetS Evolving Dragon

    Likes Received:
    Best Answers:
    Trophy Points:
    in your .htaccess file, insert the following:

    <FilesMatch "\.htm$">
    ForceType application/x-httpd-php
    <FilesMatch "\.html$">
    ForceType application/x-httpd-php

    This will work on a directory basis, or you can put it in your root directory only if I am not mistaken to handle all of the files on your website. it can also go in your httpd.conf file if you'd like. (most .htaccess directives can go there). I did that originally because there were rumors going around that search engines like .htm files better than .php files... but that was only a rumor.
    nevetS, Dec 5, 2004 IP