html or does it have to be php

Discussion in 'HTML & Website Design' started by drcensor, Feb 23, 2013.

  1. #1
    I am thinking of changing my pages so they have php headers and footers and sidebar,
    but my index page as a page rank of 2, so if I change my page and put in the php pages for the header, footer and sidebar, would it wrong to leave it .html or do I have change it to .php
     
    Solved! View solution.
    drcensor, Feb 23, 2013 IP
  2. jamjar919

    jamjar919 Well-Known Member

    Messages:
    332
    Likes Received:
    7
    Best Answers:
    5
    Trophy Points:
    180
    #2
    You can still leave pages with PHP in as HTML versions (I believe). If this is not the case, your page rank will stay if you change the old html page to a 301 redirect.
     
    jamjar919, Feb 23, 2013 IP
  3. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #3
    If all you intend is to provide a single source file for each of these sections, you need not use php include() functions. The Apache server, and others, provide for a server-side include. Normally, you'd change the .html extension to .shtml to process the instruction. There is an alternative, though; the XBitHack. You leave the extension as .html but set the execute bit on the file.

    See Apache Tutorial: Introduction to Server Side Includes
    http://httpd.apache.org/docs/2.2/howto/ssi.html
    and
    XBitHack Directive.
    http://httpd.apache.org/docs/2.2/mod/mod_include.html#xbithack

    cheers,

    gary
     
    kk5st, Feb 23, 2013 IP
  4. #4

    you have to change it otherwise your functions will not work properly
     
    sanchyclub, Feb 23, 2013 IP
  5. natesmarketing

    natesmarketing Member

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #5
    You can change your index.html to index.php without any issues.
     
    natesmarketing, Feb 23, 2013 IP