.html to .php Improved CMS

by 12 replies
14
Hey,

I am currently in the process of changing my site over from .html to .php, in order to make it more dynamic and improve the CMS on it. However, I do NOT want to lose my rankings in Google.

I run a site at Report Online Scams | Scams, Frauds,Ripoff,Fraudster,Con-artist Reported Online

and you can see the new design will be:
http://www.deaddogdesign.net/scam/

As you can see the new page is php and I have been considering doing the .htaccess thing where I can redirect all .html to .php. I just want to make sure that I DO NOT loose any of my rankings in Google.

Also, as you can see the new design needs the .php because it has be integrated with a footer.php, ads.php, ect where I can change one file and it will update a part of each page. Can't do that using .html. I need this for my CMS, but if there is a way to do it using HTML I could do it. I know that if I had some javascript on each page it would not help with my internal link structure. Any ideas of what to do? Has anyone ever converted over to .html to .php using .htaccess and did they lose their organic search rankings?

Pleas help!
#website design #cms #html #improved #php
  • I did this recently (bottom sig site) and lost all my page rank. Wasn't concerned because the site only has had about 500 visitors and a lot of the pages had a pr of 3 or 4. I was going to loose that anyway as the dance progressed.

    I did see a code snippet that claimed the redirect would keep the page rank of the original html pages, but can't find it in my notes now. (I didn't use it.) This page was interesting though. Redirect Visitors To a New Page or Site - HTML Tips and Tricks
    • [1] reply
    • Did you do it with the .htaccess because I have heard that you will not lose anything in the search engines if you do it that way?
  • There are two different ways you can do this change with htaccess rewrite rules.

    The first, which I believe is what you're already thinking, is a redirect. mypage.html bounces to mypage.php. The critical part is to make this a code 301 "move permanantly" redirect. This tells Google that the page is now at the new .php url for good, and they should update thier indexes.

    I'm no SEO expert, but as long as the code 301 redirect is done properly, this should not affect ranking. (though slight changes in the page content caused by the redesign might)

    There's also an option two... an invisible redirect.

    With this, mypage.html stays at mypage.html in appearance, but your website knows to deliver mypage.php in the background. To the outside world, including search engines, the address remains the same... but you're still working with PHP technology.

    This is also done with htaccess rewrite rules, the only difference is the browser address is not redirected.

    I hope that gets you pointed in the right direction.

    -Ryan
  • Banned
    [DELETED]
  • thanks a lot I have been checking around and that seems like the best way to do it
  • I am having so much trouble with this .htaccess file. Every time I put in on my site I get a error. Any ideas on what to put in it for .html to .php ?
    • [1] reply
    • One trick I use to debug htaccess files is a process of elimination to find out what is causing the trouble.

      You can disable a line by adding a # in front. Disable everything and save it, then one by one remove the #'s until the error shows up.

      I'll try to find my working example of the "secret" html to php masking. It's on another computer.

      -Ryan
  • ok cool. I would really appreciate it. I don't know the first thing about it and just need all the code from scratch. This is driving me insane
    • [1] reply
    • Here is the basic htaccess code:

      Code:
      RewriteEngine on
      
      RewriteRule ^(.*)\.html$ $1.php [QSA,L]
      With that a request for anything.html will pull up the file anything.php, but the browser will show the original anything.html as the address.

      It will also handle subdirectories, so folder/anything.html finds folder/anything.php.

      One thing to be mindful of is that with this system, if somebody types in anything.php the page will come up under that address. For a healthy SEO set-up, .php should redirect back to .html, but I didn't want to put that rule in as it may cause trouble with other scripts.

      -Ryan
  • every time I do it I get this:

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, webmaster@deaddogdesign.bestqualityproducts.net and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    More information about this error may be available in the server error log.
    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
    • [1] reply
    • You can look at your Apache error log to get the message about what the problem really is.

      In cPanel you can click on "error logs" in the Logs section to see the most recent problems.

      -Ryan
  • [Thu Feb 04 17:13:13 2010] [alert] [client 75.39.53.174] /home/bestqual/public_html/DEADDOGDESIGN.NET/.htaccess: Invalid command '{\\rtf1\\ansi\\ansicpg1252\\cocoartf949\\cocoasub rtf540', perhaps misspelled or defined by a module not included in the server configuration
    [Thu Feb 04 17:13:13 2010] [alert] [client 75.39.53.174] /home/bestqual/public_html/DEADDOGDESIGN.NET/.htaccess: Invalid command '{\\rtf1\\ansi\\ansicpg1252\\cocoartf949\\cocoasub rtf540', perhaps misspelled or defined by a module not included in the server configuration
    [Thu Feb 04 17:12:50 2010] [alert] [client 75.39.53.174] /home/bestqual/public_html/DEADDOGDESIGN.NET/scam/.htaccess: Invalid command '{\\rtf1\\ansi\\ansicpg1252\\cocoartf949\\cocoasub rtf540', perhaps misspelled or defined by a module not included in the server configuration
    • [1] reply
    • I'm pleased to report that we got everything working. As a wrap-up I thought it might be helpful to share the resolution so that our grandchildren's grandchildren can benefit.

      The server errors caused by the htaccess file were due to the rich text format editor being used. It was adding extra, invalid characters to the top of the file.

      The moral of the story is: when editing htaccess files, or any server config files, make sure you're using plain text. (the Notepad program on windows is ideal)

      -Ryan

Next Topics on Trending Feed