Changing file extensions!?

Discussion in 'Programming' started by dre, Mar 24, 2008.

  1. #1
    Hi, i want to change a php page's file extension to one of a html.

    Im using the following code

    AddType application/x-httpd-php html
    PHP:
    when i visit the url with the new file extension it just asks me to download the file:confused:
     
    dre, Mar 24, 2008 IP
  2. Alex Berdan

    Alex Berdan Peon

    Messages:
    104
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I think it's for your hosting settings. you have to contact to your host admin.
     
    Alex Berdan, Mar 24, 2008 IP
  3. clinton

    clinton Well-Known Member

    Messages:
    2,166
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    110
    #3
    that goes inside your .htaccess(a hidden file), most hosts have it disabled but ask your hosting company how to access or modify this file.:)
     
    clinton, Mar 24, 2008 IP
  4. dre

    dre Peon

    Messages:
    1,367
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Alright I fixed it!

    Basically it's because I am using php5

    So I need this code instead.

    AddType application/x-httpd-php5 html
    PHP:
    - note the 5
     
    dre, Mar 24, 2008 IP