Announcement

Collapse
No announcement yet.

Adding RSS Feed in PHP Code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Originally posted by olderscot View Post
    Probably.

    What I was looking for is to see the code live on your website so I could take a look at what's happening to try and work out why it isn't working.

    Any chance you could make the change and upload to your website.

    Mike
    OK its uploaded and shows no changes to the site.

    Comment


      #17
      Originally posted by olderscot View Post
      Probably.

      What I was looking for is to see the code live on your website so I could take a look at what's happening to try and work out why it isn't working.

      Any chance you could make the change and upload to your website.

      Mike
      OK its uploaded now and no changes to the website.

      Comment


        #18
        OK. I'm back from the school run.

        If you look at the page source on the website you'll see that the php is shown there which means the server isn't parsing (i.e. processing) it.

        This is as we thought which means the answers above are all relevant.

        You you can change the home page extension to .php (but that might cause link problems - which can be got around using redirects in a .htacces file) or you can configure the server to 'parse .html pages' (a search on google will tell you how - some hosts don't like this as it increases the server load).

        TBH I wouldn't do either. I'd say the SEO benefits of having an external news feed on your sight are small and the difference between using javascript and php are probably pretty small too.

        Mike
        -----------------------------------------

        First Tackle - Fly Fishing and Game Angling

        -----------------------------------------

        Comment


          #19
          Originally posted by olderscot View Post
          OK. I'm back from the school run.

          If you look at the page source on the website you'll see that the php is shown there which means the server isn't parsing (i.e. processing) it.

          This is as we thought which means the answers above are all relevant.

          You you can change the home page extension to .php (but that might cause link problems - which can be got around using redirects in a .htacces file) or you can configure the server to 'parse .html pages' (a search on google will tell you how - some hosts don't like this as it increases the server load).

          TBH I wouldn't do either. I'd say the SEO benefits of having an external news feed on your sight are small and the difference between using javascript and php are probably pretty small too.

          Mike
          Hmmm sounds like then perhaps just stick to the google one then if it dosnt make that much difference. The google one seems to work fine.
          I just thought it would make a big difference to my search engine result but if its only a small difference its not worth all the work involved.

          Thanks mile for your time and help, and to everyone els.
          I think for now I will stick to the google feed and perhaps look at this later.

          Many thanks
          Simon

          Comment


            #20
            following on from mike, if you opt to edit your htaccess file then not all commands work with all servers.

            you could try adding this line and see if it works

            Code:
            AddType application/x-httpd-php .html .php .htm
            # addhandler application/x-httpd-php .html .phpRewriteCond %{HTTP_REFERER} !^http://yourdomain.co.uk/.*$      [NC]
            As i said you may need to tweak the lines to work with your server but this should do it, dont forget to change the yourdomain bit to your domain

            hope this helps

            Comment

            Working...
            X