PHP on .html pages. Please Help!

Discussion in 'PHP' started by comanche82, Nov 26, 2007.

  1. #1
    My website is in .html and I want to change it over to .PHP. Is there any way I can run PHP on my .html website without changing all my page extensions to .PHP? I don’t want to loose any back links or SEO by just changing all my page extensions to .PHP. If there is a way of doing this can you please explain it to me. Thank You
     
    comanche82, Nov 26, 2007 IP
  2. madk

    madk Peon

    Messages:
    141
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    madk, Nov 26, 2007 IP
  3. greatlogix

    greatlogix Active Member

    Messages:
    664
    Likes Received:
    13
    Best Answers:
    1
    Trophy Points:
    85
    #3
    If you are using Apache and have access to apache configuration than edit httpd.conf
    find ScriptAlias and on the next line to ScriptAlias put following text

    AddType application/x-httpd-php .html

    Now you can code PHP in files having .html extension
     
    greatlogix, Nov 26, 2007 IP
  4. comanche82

    comanche82 Well-Known Member

    Messages:
    732
    Likes Received:
    79
    Best Answers:
    0
    Trophy Points:
    118
    #4
    Thanks for the help.
     
    comanche82, Nov 26, 2007 IP