6 Replies Latest reply on Aug 6, 2006 5:41 AM by Newsgroup_User

    SSI's / PHP include

    Level 7

      Now experimenting with PHP thanks to Dave Powers excellent book.

      Now Murray amongst other have been nagging us for ages to use Server
      Sides ( SSI ) - but I found that PHP include() function does a very
      similar thing. I've tried that and it works on my Windows XP / Apache
      / PHP set up.

      So maybe I give .shtml files a miss altogether and go straight to php
      - slowly adding dynamic content as I learn

      Or do .shtml files still have a place ?

      I'm concerned that changing file names to .shtml and/or php will
      change the sites search engine rating ?

      So maybe I need just the home page as an html page to retain some sort
      of search engine ranking until they catch up with the .php or .shtml
      files ???

      Having installed Apache and php - I thought I would try SSI - but
      can't get apache to parse the file for includes - even though I have
      enabled the following and rebooted the PC.

      AddType text/html .shtml
      AddOutputFilter INCLUDES .shtml

      It also says I should add the +Includes to the Options directive - I
      can't find that in httpd.conf ???


      Many thanks for any help.
      Malcolm



      --

      Malcolm
      webmaster http://www.nb-president.org.uk/
      The coal fired steam narrow boat.
      Kildare is now back in the water
        • 1. Re: SSI's / PHP include
          Level 7
          Malcom wrote:
          > Now Murray amongst other have been nagging us for ages to use Server
          > Sides ( SSI ) - but I found that PHP include() function does a very
          > similar thing.

          Yes, Murray does tend to nag, but he's only recently become a convert to
          PHP. If your site is PHP-compatible, PHP includes are all you need. PHP
          is a server-side language. When you use include() or require(), you're
          including the file on the server side. It *is* a server-side include,
          but uses PHP syntax, rather than the shtml syntax.

          > So maybe I give .shtml files a miss altogether and go straight to php
          > - slowly adding dynamic content as I learn

          Absolutely.

          > So maybe I need just the home page as an html page to retain some sort
          > of search engine ranking until they catch up with the .php or .shtml
          > files ???

          You can do that. The alternative is to create a "permanently moved"
          redirect with .htaccess.

          http://corz.org/serv/tricks/htaccess2.php

          --
          David Powers
          Adobe Community Expert
          Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
          http://foundationphp.com/
          • 2. Re: SSI's / PHP include
            Level 7
            On Sun, 06 Aug 2006 11:09:30 +0100, David Powers <david@example.com>
            wrote:


            >> So maybe I need just the home page as an html page to retain some sort
            >> of search engine ranking until they catch up with the .php or .shtml
            >> files ???
            >
            >You can do that. The alternative is to create a "permanently moved"
            >redirect with .htaccess.
            >
            > http://corz.org/serv/tricks/htaccess2.php

            Very many thanks David - isn't the web wonderful for getting things
            done quickly - I used to spend weeks fixing problems with my old
            Nascom 2 and CP/M !!!.

            but doesn't that mean persuading my hosting company - 1and1 to modify
            their .htaccess file ??

            Malcolm





            --

            Malcolm
            webmaster http://www.nb-president.org.uk/
            The coal fired steam narrow boat.
            Kildare is now back in the water
            • 3. Re: SSI's / PHP include
              Level 7
              On 06 Aug 2006 in macromedia.dreamweaver, Malcom wrote:

              > So maybe I give .shtml files a miss altogether and go straight to php
              > - slowly adding dynamic content as I learn

              I'd go straight to PHP. That way, when you're ready to dive into dynamic
              content, your pages are ready for it. (Actually, particularly if you're
              on an Apache server, you can make the server think that .shtml pages are
              php. However, it makes other things - like convincing DW that .shtml
              really means .php - more difficult. But I digress.) And, as far as I
              know, it puts at best minimal additional strain on your server. So it's
              a good situation all 'round - go for it.

              --
              Joe Makowiec
              http://makowiec.net/
              Email: http://makowiec.net/email.php
              • 4. Re: SSI's / PHP include
                Level 7
                On 06 Aug 2006 in macromedia.dreamweaver, Malcom wrote:

                > but doesn't that mean persuading my hosting company - 1and1 to modify
                > their .htaccess file ??

                Probably not. .htaccess files are plain text files which you have full
                control over; the only issue is if 1&1 has disabled them.

                --
                Joe Makowiec
                http://makowiec.net/
                Email: http://makowiec.net/email.php
                • 5. Re: SSI's / PHP include
                  Level 7
                  And they haven't. Just create a document in Notepad and save it as All Files
                  > .htaccess, and upload it to your root directory.

                  Also, if you're switching to PHP - 1&1 has a special way for you to handle
                  ErrorDocument in your .htaccess file (for redirecting visitors upon a 404,
                  500, etc. error).

                  BTW, I'm using 1&1, also.

                  --
                  Shane H
                  shane@NOSPAMavenuedesigners.com
                  http://www.avenuedesigners.com

                  =============================================
                  Proud GAWDS Member
                  http://www.gawds.org/showmember.php?memberid=1495

                  Delivering accessible websites to all ...
                  =============================================


                  "Joe Makowiec" <makowiec@invalid.invalid> wrote in message
                  news:Xns981744E1FF320makowiecatnycapdotrE@216.104.212.96...
                  > On 06 Aug 2006 in macromedia.dreamweaver, Malcom wrote:
                  >
                  >> but doesn't that mean persuading my hosting company - 1and1 to modify
                  >> their .htaccess file ??
                  >
                  > Probably not. .htaccess files are plain text files which you have full
                  > control over; the only issue is if 1&1 has disabled them.
                  >
                  > --
                  > Joe Makowiec
                  > http://makowiec.net/
                  > Email: http://makowiec.net/email.php


                  • 6. Re: SSI's / PHP include
                    Level 7
                    On Sun, 6 Aug 2006 07:11:57 -0400, "Shane H"
                    <shane@NOSPAMavenuedesigners.com> wrote:

                    >And they haven't. Just create a document in Notepad and save it as All Files
                    > > .htaccess, and upload it to your root directory.
                    >
                    >Also, if you're switching to PHP - 1&1 has a special way for you to handle
                    >ErrorDocument in your .htaccess file (for redirecting visitors upon a 404,
                    >500, etc. error).
                    >
                    >BTW, I'm using 1&1, also.


                    Thanks Shane,

                    can you point me to the help file on 1and1 that might exp[lain this
                    please.

                    I had a look around the 1and site for info but drew a blank.

                    Malcolm
                    --

                    Malcolm
                    webmaster http://www.nb-president.org.uk/
                    The coal fired steam narrow boat.
                    Kildare is now back in the water