Adding Dynamic PHP to a site with Static Pages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • choona
    Registered User
    • Dec 2010
    • 33

    #1

    Adding Dynamic PHP to a site with Static Pages

    I would like to add dynamic PHP pages to my site that is currently all static HTML pages.
    I have a few concerns, primarily off page issues. I'm currently redesigning my site to update automatically.
    Some problems might be:
    • 404 errors
    • Google penalties
    • Pages that are already indexed by search engines


    How do I make my static HTML page dynamic PHP without screwing up my search engine results?
  • TheDoc
    Too lazy to set a custom title
    • Jul 2001
    • 13827

    #2
    Does the dynamic php change have a query string or something?

    Other than any changes to your site can change your rankings, going dynamic vs. static for automatic updates shouldn't hurt your rankings or give you a penalty.

    With 404 errors and pages already in the index, you do 301 redirects. Or name the files the same .html files, in a .htaccess file add AddType application/x-httpd-php .html to get the html to execute the php.

    301 redirect example for your .htaccess file
    redirect 301 /path/of/old/file.html http://www.domain.com/full-new-path.php

    You can also use Google Webmaster Tools, verify your site, and let Google tell you about any errors that you missed... easy way to make sure those important pages you may have missed get corrected.
    Last edited by TheDoc; 02-03-2011, 06:44 PM.
    ~TheDoc - ICQ7765825
    It's all disambiguation

    Comment

    • Jakenavaro
      Confirmed User
      • Aug 2007
      • 285

      #3
      try to validate first your html in w3c so you can see your html errors you need to validate also your css/xhtml.

      Comment

      • robber
        Web Developer
        • Jan 2011
        • 264

        #4
        Originally posted by choona
        I would like to add dynamic PHP pages to my site that is currently all static HTML pages.
        I have a few concerns, primarily off page issues. I'm currently redesigning my site to update automatically.
        Some problems might be:
        • 404 errors
        • Google penalties
        • Pages that are already indexed by search engines


        How do I make my static HTML page dynamic PHP without screwing up my search engine results?
        You should be able to achieve a working site that shouldn't change any links by utilising mod_rewrite within your .htaccess file. You will be able to design all your dynamic content and provide meaningful pages without too much hardwork, and your design can be easily amended or changed depending upon what you are wanting to achieve. If you redirect any old links to our new pages any page rank attached to the old pages should transfer over to the new ones. If you want to clarify anything or have, feel free to send me a message on icq, I'm happy to help.

        Comment

        • HomerSimpson
          Too lazy to set a custom title
          • Sep 2005
          • 13826

          #5
          you can also tell apache to parse .html file same as .php ones
          this way you'll have .php files with html extension...

          it's easy to do and to maintain in future...
          Make a bank with Chaturbate - the best selling webcam program
          Ads that can't be block with AdBlockers !!! /// Best paying popup program (Bitcoin payouts) !!!

          PHP, MySql, Smarty, CodeIgniter, Laravel, WordPress, NATS... fixing stuff, server migrations & optimizations... My ICQ: 27429884 | Email:

          Comment

          • Denny
            Too lazy to set a custom title
            • Feb 2005
            • 17389

            #6
            Originally posted by HomerSimpson
            you can also tell apache to parse .html file same as .php ones
            this way you'll have .php files with html extension...

            it's easy to do and to maintain in future...
            yep, I did it like that way a few times.

            Code:
            AddType application/x-httpd-php .html
            AddType application/x-httpd-php .htm
            Last edited by Denny; 02-04-2011, 06:52 PM.

            Comment

            • seoguyzzz
              Confirmed User
              • Sep 2009
              • 997

              #7
              rewrite .php urls to .htm urls using .htaccess file
              best if u cab get page titles in page url name.
              thx
              icq:- 563619491


              article submissions + directory submissions

              Comment

              • choona
                Registered User
                • Dec 2010
                • 33

                #8
                Everyone thanks for the tips on parsing html as php.
                I just tried it on my local machine thru Wamp Server.
                I used this:
                Code:
                AddHandler application/x-httpd-php .html
                Instead of adding this code to .htacces, I used httpd.conf

                So it looks like I can use all the same file names.

                Comment

                Working...