are server side includes search engine friendly?

Discussion in 'HTML & Website Design' started by zopharmarcus, Jan 19, 2010.

  1. #1
    Hi,

    Currently i have my website navigations in iframes. However, this is not search engine friendly and are non-indexable.

    I plan to insert SSI (server side includes) navigation menus for footer, header navigtion. However I am not sure if the links in the SSI navigation would be indexable by seach engines.
     
    zopharmarcus, Jan 19, 2010 IP
  2. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Don't worry. SE's only see your outputted HTML code, not your PHP/whatever code..

    Look at your page, with includes, in your browser. Go to View > View Source (or Page Source). The HTML output is exactly what an SE will encounter.

    Includes are not only completely safe for SE's, they are recommended (because of the frame problem you mentioned earlier).
     
    Stomme poes, Jan 20, 2010 IP
  3. zopharmarcus

    zopharmarcus Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks there!

    is redirecting the index.html to index.shtml mandatory for SSI's.

    and in that case would all the pages in .html not required to be in .shtml

    sounds like a lot of mess?
     
    zopharmarcus, Jan 20, 2010 IP
  4. blacksheep666

    blacksheep666 Active Member

    Messages:
    68
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #4
    
    one example is rewriting the url address
    
    example:
    
    url           = www.domain.com/news.php?id=1&title=news&category=10
    rewrite url = www.domain.com/news-1-10.html
    
    
    Code (markup):
     
    blacksheep666, Jan 20, 2010 IP
  5. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I dunno, but with Apache's mod_rewrite you can just let people keep using and seeing .html.

    
    RewriteEngine On
    RewriteRule \.html$ .shtml [L]
    
    Code (markup):
    That code above may not work, it depends on how you're set up. Using Apache2 with .htaccess, it should work, but for instance I directly use main config files so I would need a leading / top start off the match, because it starts out assuming the ulr begins with mysite.com/


    If I can find it, Dan Schulz had a nice thread about ssi's and how to set them up.

    *edit here:
    http://forums.digitalpoint.com/showthread.php?t=223056#post2145250
     
    Last edited: Jan 21, 2010
    Stomme poes, Jan 21, 2010 IP
  6. Dogs_and_things

    Dogs_and_things Active Member

    Messages:
    97
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #6
    Yeah, he helped me a lot with that thread, it's very clear, simple and to-the-point.

    If you can´t include php in .html files you can also add
    AddType application/x-httpd-php .htm .html
    
    Code (markup):
    to your .htaccess.
    That might work and if it does
    <?php include($DOCUMENT_ROOT . "/includes/filename.inc.php"); ?>
    Code (markup):
    will do the include job perfectly.
     
    Dogs_and_things, Jan 21, 2010 IP
  7. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thanks, Señior Dogs, it didn't occur to me that Apache might not run .php by default. I figure if you're using mode_php you wouldn't have to manually AddType or running mod_perl wouldn't need to AddType .pl.
     
    Stomme poes, Jan 21, 2010 IP
  8. Dogs_and_things

    Dogs_and_things Active Member

    Messages:
    97
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #8
    Hello Miss Poes,

    I understand many shared hostings don´t have Apache set to run php by default, but you can trigger it to allow php by using the code I posted, although apparently not on all servers.

    Groetings.
     
    Dogs_and_things, Jan 22, 2010 IP