Is changing all my pages from .php to .html a good idea?

Discussion in 'PHP' started by Imozeb, May 1, 2010.

?

Is changing all my .php files to .html files a good idea?

Poll closed May 6, 2010.
  1. Yes. It makes it slightly harder for hackers to hack the page.

    1 vote(s)
    14.3%
  2. Yes. Because it looks more professional and perhaps generic than .php

    1 vote(s)
    14.3%
  3. No. (Explain...)

    5 vote(s)
    71.4%
Multiple votes are allowed.
  1. #1
    Is changing all my pages from .php to .html a good idea?
     
    Imozeb, May 1, 2010 IP
  2. killaklown

    killaklown Well-Known Member

    Messages:
    2,666
    Likes Received:
    87
    Best Answers:
    0
    Trophy Points:
    165
    #2
    Yes, but neither of those "Yes" options are correct. .html extension is preferred for SEO, it has nothing to do with hacking or looking professional.
     
    killaklown, May 1, 2010 IP
  3. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #3
    i dont think it matters a much at the end of the day .html is mainly for static sites and now people are slowly moving away from it unless u mean to do this via mod rewrite
     
    Bohra, May 1, 2010 IP
  4. krsix

    krsix Peon

    Messages:
    435
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #4
    No. Any extension is preferred for SEO, there is no difference at all;.
     
    krsix, May 1, 2010 IP
  5. Imozeb

    Imozeb Peon

    Messages:
    666
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Okay, but I read in a .php security page that changing the pages from .php to .html could deter 1% of hackers (every little bit helps :) ) or at least make it harder for them to hack the page because they don't know which coding language to start with.
     
    Imozeb, May 2, 2010 IP
  6. Rory M

    Rory M Peon

    Messages:
    1,020
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I really doubt that it would be any deterrent at all
     
    Rory M, May 2, 2010 IP
  7. lulabie

    lulabie Member

    Messages:
    218
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #7
    i prefer using ht,l than using php..it's more familiar for me
     
    lulabie, May 2, 2010 IP
  8. mysql_create_db

    mysql_create_db Guest

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    i prefer delete .php only
    without adding .html
     
    mysql_create_db, May 2, 2010 IP
  9. cedivad

    cedivad Peon

    Messages:
    36
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Belive me, there are ABSOLUTLY NO DIFFERENCE on doing it. Oh.. yes... maybe you will have to wait 6 month to get google to re-index your whole site.
     
    cedivad, May 2, 2010 IP
  10. DIY

    DIY Peon

    Messages:
    94
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I can't see any benefit at all of doing this.

    php is much better as you can do much more with it. I have hundreds of .html pages on my site and I wish that they were php pages now as it is much more flxible!
     
    DIY, May 2, 2010 IP
  11. killaklown

    killaklown Well-Known Member

    Messages:
    2,666
    Likes Received:
    87
    Best Answers:
    0
    Trophy Points:
    165
    #11
    No. index.php?category=Testing&page=2 is not preferred over /testing/page2.html


    OP. if you mean you have page1.php, page2.php, page3.php, etc... without passing any parameters in the url, then there is no point in moving to html. I was assuming you meant mod rewrite to change the .php extension to .html.
     
    killaklown, May 2, 2010 IP
  12. SkullKing

    SkullKing Guest

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Depends on your personal opinion, I personally think that a URL like questions.php?answer=123 looks pretty ugly compared to question/answer/123.
     
    SkullKing, May 2, 2010 IP
  13. Imozeb

    Imozeb Peon

    Messages:
    666
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #13
    But if I just change the extension and add a rule in my .htaccess file, it shouldn't affect the way my pages are parsed right?
     
    Imozeb, May 2, 2010 IP
  14. Dennis M.

    Dennis M. Active Member

    Messages:
    119
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #14
    It's hands down a yes, but as mentioned by someone else; those reasons don't really cut it. Mainly this is done for SEO. Search engines love static content (.html). However, if you are a frequent updater, I suggest you *trick* the search engines and use ModRewrite (apache module) in an effective way where every page can have a unique PAGE_NAME.html and grab it's truly dynamic content. However, it appears static which is all that matters!

    Regards,
    Dennis M.
     
    Dennis M., May 2, 2010 IP
  15. s.ham

    s.ham Member

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #15
    Yes, I agree with Dennis.
     
    s.ham, May 2, 2010 IP
  16. Imozeb

    Imozeb Peon

    Messages:
    666
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #16
    If I change my pages to .html search engines will still parse the php code in the pages right?

    Like:
    <?PHP
    if($foo == 1)
    }
    //do this
    else
    {
    //do that
    }
    ?>
    Code (markup):
    My most of the urls I am planning to change are not like: www.mysite.com/file.php?y=139DAsd9312&va=3019OOP They are just like www.mysite.com/file.php So they are basicly static already with some php code mixed in with the html for querying databases and including file contents.
     
    Imozeb, May 3, 2010 IP
  17. Link Hijinx

    Link Hijinx Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #17
    I have said "no", because everything and anything google has ever taught me says that it does not matter, and their algorythms are smart enough to work around it.

    If I didn't listen to google, I would have said no.
     
    Link Hijinx, May 3, 2010 IP