html to php

Discussion in 'PHP' started by Kngavl, Apr 4, 2008.

  1. #1
    If I converted all my pages to the .php extension. (there html's right now) I suspect that this'll change my rankings in SERP's and it will also screw up any page linking to me correct?
    I'm trying to parse php files and the only way I can get the php to work is if I rename my extensions to php instead of html.
     
    Kngavl, Apr 4, 2008 IP
  2. AsHinE

    AsHinE Well-Known Member

    Messages:
    240
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    138
    #2
    Try add this line in .htaccess file
    
    AddType application/x-httpd-php .html .htm
    
    Code (markup):
    to use php in html files.
    So you don't have to rename files.
     
    AsHinE, Apr 4, 2008 IP
  3. vishnups

    vishnups Banned

    Messages:
    166
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Who has told you that using PHP will lower you search engine ranking????? My site is ranked No: 1 in Google for key words like "Free Medical Video Lectures"..my site is http://www.learnerstv.com and I am using PHP throughout my website. Search engine ranking is not based on whether your pages are developed in PHP or ASP or PERL etc...There are lot of other factors including certain steps that need to be taken while developing your website. I am a php programmer and have done several websites which are ranked high. Please remove those false notions from your mind and develop your pages properly and other steps that need to be done to achieve a higher ranking. No Black Hat techniques should be adopted to achieve a higher ranking as your website can get permanently banned by Google...:)
     
    vishnups, Apr 4, 2008 IP
  4. AsHinE

    AsHinE Well-Known Member

    Messages:
    240
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    138
    #4
    I guess Kngavl is afraid that if he switches to php there will be no pages with .html extention, so server will give 404 error if google bot asks for page.html, cause new page will be page.php
     
    AsHinE, Apr 4, 2008 IP
  5. vishnups

    vishnups Banned

    Messages:
    166
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    What do you mean by "google bot asks for page.html" . If a page has changed Google Bot will index the new page. It will not affect search engine engine ranking..which Kngavl was referring to. It will not screw up your links as all you need to is change your existing links to page.php . Always go for modular design..like a header.inc.php and footer.inc.php as you need to make the change only once and it will get reflected in all pages. It depends on the way that you have done your website. Professional websites with hundreds of pages dynamically created uses modular design.
     
    vishnups, Apr 4, 2008 IP
  6. Kngavl

    Kngavl Peon

    Messages:
    964
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Well if I have a thousand links pointing to www.mywebsite.com (with an index.html) are they not all point to the equivalent of www.mywebsite.com/index.html? So if I switched it to www.mywebsite.com/index.php would it not cancel out all the links as they were directed to the original index.html and not the new index.php?
    I can't use the htaccess, there are "issues".

    @vishnups
    Of course I know it doesn't matter if your page is in html, perl or php. The issue with SERP's is whether or not this will effect my backlinks count thus effecting my SERPS.
    Sorry for the confusion.
     
    Kngavl, Apr 4, 2008 IP
  7. vishnups

    vishnups Banned

    Messages:
    166
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #7
    If you have thousand links pointing to a link and you need to edit all those pages to change a link..it is due to bad designing. That is why I have referred to a modular design. Suppose all of your pages have a header menu with all links. It is always advisable to do it as a header file and include it in your pages using php includes...so that you need change the link only at one place and all the pages will get updated...Hope you got it..If your website is not modular there is no easy way...
     
    vishnups, Apr 4, 2008 IP
  8. Kngavl

    Kngavl Peon

    Messages:
    964
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #8
    No like there are thousands of websites linking to me. I'm not linking with them or with myself, thats no problem. The backlinks are what I'm thinking about. But if I take what your saying and apply it to my case then I'd be screwed as those websites linking to me would have to link to a new index.php file. Correct?
     
    Kngavl, Apr 4, 2008 IP
  9. vishnups

    vishnups Banned

    Messages:
    166
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Ok...If others are linking to your website as www.yoursite.com and you change your index.html to index.php will not affect the links..as your home page will be displayed irrespective of whether it is index.php or index.html. But if they are linking as www.yourwebsite.com/index.html it will affect ..Hope you got it :)
     
    vishnups, Apr 4, 2008 IP
  10. zerxer

    zerxer Peon

    Messages:
    368
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #10
    You could set it up in your .htaccess so all requests to index.html are 301'd (permanent redirect) to your new index.php
     
    zerxer, Apr 4, 2008 IP