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.

Is it possible to

Discussion in 'HTML & Website Design' started by justme234, Aug 28, 2004.

  1. expat

    expat Stranger from a far land

    Messages:
    873
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #21
    no no renaming required. You can set any file extension specifically .htm .html .shtm etc to race through the php interpreter.

    Ask your horting provider to set it up for you or if you have cpanel or access to apache its apache handlers

    .htm

    application/x-httpd-php
    etc.
    M
     
    expat, Dec 5, 2004 IP
  2. nevetS

    nevetS Evolving Dragon

    Messages:
    2,544
    Likes Received:
    211
    Best Answers:
    0
    Trophy Points:
    135
    #22
    in your .htaccess file, insert the following:

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


    ----------
    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
  3. ian_ok

    ian_ok Peon

    Messages:
    551
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #23
    Can you explain the above? I've had a reply from my host and they say I have to re-name all my files to php.

    I can't use a .htaccess file on the server I'm hosted with.

    Ian
     
    ian_ok, Dec 6, 2004 IP
  4. expat

    expat Stranger from a far land

    Messages:
    873
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #24
    That is very sad for a hosting provider.

    If you're on apache / ...nix all they need to do is one definition in the apache conf file which will only be for your account and not generic and doesn't need restarting of apache.

    But if they don't you may want to concider changing host as they will have other restrictions which may harm development.
    As you wrote "no .hataccess" so this may limit mod_rewrite you may wish to use later etc etc.

    To get an idea what is available for small money check totalchoicehosting.com

    M
     
    expat, Dec 6, 2004 IP
  5. rtheodorow

    rtheodorow Peon

    Messages:
    129
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #25
    Includes are the best part of PHP :D
     
    rtheodorow, Jan 25, 2005 IP