HOW to add new file extension(.phpt) in apache

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gauravgmbhr
    New Member
    • Feb 2007
    • 107

    HOW to add new file extension(.phpt) in apache

    hi
    m working with PHP
    and i wrote some Test cases for each of my function

    i want to follow the notation
    file name = name.php
    test file = name.phpt

    so i need to add new extension called Phpt into apache so that i can be parsed in the same way as Php

    Can some one tell me how to add new file extension in apache
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    There are 2 methods you can add

    Code:
    AddType application/x-httpd-php .phpt
    to the httpd.conf file or you could add

    Code:
    application/x-httpd-php phpt
    to mime.type or alter the application/x-httpd-php line that already exists to include phpt.


    If you don't have access to the Apache configuration files I think (???) you can try adding

    Code:
    AddType application/x-httpd-php .phpt
    to the .htaccess file in the required directory of your site (or may be the root) but I am not 100% sure on that.

    Comment

    • gauravgmbhr
      New Member
      • Feb 2007
      • 107

      #3
      Originally posted by Banfa
      There are 2 methods you can add

      Code:
      AddType application/x-httpd-php .phpt
      to the httpd.conf file or you could add

      Code:
      application/x-httpd-php phpt
      to mime.type or alter the application/x-httpd-php line that already exists to include phpt.


      If you don't have access to the Apache configuration files I think (???) you can try adding

      Code:
      AddType application/x-httpd-php .phpt
      to the .htaccess file in the required directory of your site (or may be the root) but I am not 100% sure on that.
      THANX FOR UR VALUABLE HELP

      Comment

      Working...