Will renaming .html files to .php files drop PR and indexing?

Discussion in 'Search Engine Optimization' started by irideflatland, Jul 21, 2006.

  1. #1
    Or will they stay indexed and keep their PR?
     
    irideflatland, Jul 21, 2006 IP
  2. Boby

    Boby Peon

    Messages:
    207
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Yes

    If you current homepage is static (html) you can start using php files and use htaccess to redirect internally.

    So, you'll still have index.html but when the page is requested the content of index.php is shown ;)
     
    Boby, Jul 21, 2006 IP
  3. irideflatland

    irideflatland Banned

    Messages:
    515
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Can you tell me how to do this?
     
    irideflatland, Jul 21, 2006 IP
  4. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Read about mode rewrite, htaccess and start in the apache forum on DP.
     
    mad4, Jul 21, 2006 IP
  5. true_promote

    true_promote Well-Known Member

    Messages:
    528
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    138
    #5
    I dont know actually what may happen but I suggest that you must use google sitemaps so that all your renamed pages are reinde4xed.
    As for now I may suggest that you rename only few files gradually and see whats the change.
    Well if you dont use google sitemaps then you may ask me to do so for free.I will be happy to get your site indexed!!!
     
    true_promote, Jul 21, 2006 IP
  6. ravianz

    ravianz Notable Member

    Messages:
    1,536
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    250
    #6
    infect i have experienced this thing that i changed extension from htm to php; at that time i had no idea about using .htaccess;

    it had a bad impact on my organic traffic from SEs; it dropped to almost zero (i had made change in almost the whole site) and it took almost 2 months to get its old rhythem; so i would suggest you not to change the extension if you are having a large amount of traffic. One thing i did and i would advice if you change the extension then make sure that you are having 404 page which can divert some traffic to your site (i think it would not facilitate SEs though)
     
    ravianz, Jul 21, 2006 IP
  7. emz

    emz Peon

    Messages:
    364
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #7
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /
    RewriteRule ^(.+).html$ $1.php
    </ifModule>

    Something like that ;)
     
    emz, Jul 21, 2006 IP
  8. KLB

    KLB Peon

    Messages:
    1,167
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Just because you are switching over to a dynamic PHP site from a static HTML site does not mean you need to change the file extension you can simply add the following to your .htaccess file and files with the .html extension will be processed as dynamic PHP files:
    AddHandler application/x-httpd-php .html
    Code (markup):
    Changing your file extensions from HTML to PHP simply to allow you to have dynamic pages is unecessary and would have real negative impacts on your PR and SEO efforts.
     
    KLB, Jul 21, 2006 IP
  9. Ivan Bajlo

    Ivan Bajlo Peon

    Messages:
    1,288
    Likes Received:
    92
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Agreed with KLB, with mod rewrite you can make your URL look like anything you want and if your primary visitors arrive from SE you should be VERY careful about changing your links and use htaccess to do 301 every time you make changes to existing pages.

    I got hit during Google Bourbon update and loosing SE traffic for few weeks made my site virtually non existent. :(

    I have recently moved some 1600 static asp pages into dynamic php powered cms and also went seo crazy with urls. In order to make old links works htaccess catches old style links and directs them to php scripts which then redirects them to new location so now I got something like 2,2 milion redirects in two weeks! :D
     
    Ivan Bajlo, Jul 21, 2006 IP
  10. wissam

    wissam Well-Known Member

    Messages:
    2,289
    Likes Received:
    78
    Best Answers:
    1
    Trophy Points:
    185
    #10
    .htaccess is weak most of the time, it will cause you problems if you have extra parameters in the php url of the pages .
     
    wissam, Jul 21, 2006 IP
  11. KLB

    KLB Peon

    Messages:
    1,167
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I never have problems with .htaccess and I make .htaccess handle some very complex urls. Many times it is the best way to deal with certain issues and this is one of those cases. The only thing the command above is doing is instructing PHP to handle HTML files as PHP files, nothing fancy, nothing crazy.
     
    KLB, Jul 21, 2006 IP
  12. wissam

    wissam Well-Known Member

    Messages:
    2,289
    Likes Received:
    78
    Best Answers:
    1
    Trophy Points:
    185
    #12
    it did never work for me, may be it's my server doen't support it ...
     
    wissam, Jul 21, 2006 IP
  13. KLB

    KLB Peon

    Messages:
    1,167
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    0
    #13
    If you are on a shared hosting environment, your web host may have disabled .htaccess. Really .htaccess is the most important and most common way to provide configuration instructions like this to Apache particularly in a shared hosting environment. The .htaccess file is unforgiving to errors and typos. There can not be any errors in the .htaccess file or it will cause Apache to throw out server configuration errors.
     
    KLB, Jul 21, 2006 IP
  14. Boby

    Boby Peon

    Messages:
    207
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Thanks for the great tip :D
     
    Boby, Jul 21, 2006 IP
  15. Mayhem Design

    Mayhem Design Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    As stated by KLB, some hosting servers do not provide access to the .htaccess file. I know that GoDaddy do not. If modifying the .htaccess file is important to keep PR then it may be benifitial to transfer to a hosting service that does provide this access.
     
    Mayhem Design, Jul 21, 2006 IP
  16. ranman1973

    ranman1973 Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    I am with HostGator. On their help page, it states this:

    To get regular html pages to handle php code, you need to add this line to your htaccess file.
    AddHandler application/x-httpd-php5 .html .htm

    It is highly recommended that you never allow html pages to automatically handle php or shtml, because this forces all of your html pages to be processed by the server first. Instead, please rename your files to .php or .shtml whenever possible.​


    So, it looks like anyone who wants to convert to php has a choice. Change the extension of .html files to .php and lose page ranking and search engine indexing. Or change the .htaccess file at the expense of slower pages.
     
    ranman1973, Dec 21, 2009 IP