Results 1 to 23 of 23
  1. #1
    Guest
    Well Im not that new, have total understanding just never applied. Now I am.
    I was using libraries for my footer. So I made a shtml for my footer and am trying to < !--#includevirtual="Footer.shtml"-->}}}}}
    in my main page. But when uploaded, it doesn't appear. Yes I did upload the shtml file and the main index file.

    Any idea what I am doing wrong?


    Maybe I answered it, the shtml file has to contain no html, body or head tags. I have links in mine. ?????

    second, the path in the include instead of footer.shtml should be lets say.... 100pages/Footer.shtml

    correct?

    [ 07-24-2002: Message edited by: rewardme ]

  2. #2
    ABW Ambassador
    Join Date
    January 18th, 2005
    Location
    ÄúsTrálíĺ
    Posts
    1,372
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>the shtml file has to contain no html, body or head tags. I have links in mine. ?????<HR></BLOCKQUOTE>
    As far as I know, this is incorrect. I have many various portions included through ssi on my various sites.. head, body & other tags included.

    The syntax is
    -----------------
    (!--#include virtual="/header.html" --)

    - replace the ('s with <'s

    It depends on server config, but the file you want included can have any file extension, but the file calling the include should have a .shtml extension... eg, index.shtml can call includedfile.txt

  3. #3
    Newbie
    Join Date
    January 18th, 2005
    Posts
    2,694
    there should be a space between include and virtual and no space between the < and the !
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>
    < !--#include virtual="/footer.shtml"-->


    <HR></BLOCKQUOTE>

    You also need the path if you are goint to use virtual instead of file.
    Make sure the case is the same for the include file name and the SSI command

    {

    [ 07-24-2002: Message edited by: eaglefire ]

  4. #4
    Newbie
    Join Date
    January 18th, 2005
    Posts
    2,694
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>As far as I know, this is incorrect. I have many various portions included through ssi on my various sites.. head, body & other tags included<HR></BLOCKQUOTE>


    Pete - that's incorrect. If your includes have head and body tags they will create invalid HTML. They can also screw you up with the SE's.

    No head or body tags in the includes - think of it this way -when they all go together they create just ONE html document, not a lot of little ones inside of a larger one.

    [ 07-24-2002: Message edited by: eaglefire ]

  5. #5
    ABW Ambassador
    Join Date
    January 18th, 2005
    Location
    ÄúsTrálíĺ
    Posts
    1,372
    NO.. the final html document is 100% correct, even though I've included the head, etc through ssi.

    eg.. my files look like this

    html
    head
    title page title /title
    meta page desc
    meta page keywords
    include all my other stuff
    ----this include adds header stuff the same on every page--
    - meta robots
    - css stuff
    - vascript used
    - /head
    - body
    - side menu
    - start of main content table

    then in the initial doc.
    the content goes here

    ----this include adds footer stuff the same on every page--
    - end content table
    - copyright table at bottom
    - /body tag
    - /html tag

    I know what you were referring too, and I understand that, but I was meaning something different I think

  6. #6
    Newbie
    Join Date
    January 18th, 2005
    Posts
    2,694
    OK - yeah I think you *are* saying something different and now I know. I thought you knew better.

    But I think what you are answering is different than what ReWardme was asking ... and that was what I was trying to address.<IMG src=http://www.abestweb.com/ubb/icons/icon38.gif>

    Remember we went thru this all before - with islander and SSansf's page having head and body tags in her includes :

    http://www.abestweb.com/cgi-bin/ubb/...1&t=001193&p=3


    In other words, your includes should not be complete .html files in themselves with head and body tags and then placed inside another complete .html document (which is what I think Rewardme is asking). Altogether they should make up just one complete, valid, html document.

    BTW you can put html code in your includes and name it .txt - it will still work.

    {

    [ 07-24-2002: Message edited by: eaglefire ]

  7. #7
    ABW Ambassador
    Join Date
    January 18th, 2005
    Location
    ÄúsTrálíĺ
    Posts
    1,372
    lol, yeah.. i remember that thread [img]/infopop/emoticons/icon_smile.gif[/img]

    yeah.. rewardme.. if you are including a file called footer.html to go anywhere else but the top of your document.. dont put head stuff in it! <IMG src=http://www.abestweb.com/ubb/icons/icon38.gif>

    woopsy [img]/infopop/emoticons/icon_biggrin.gif[/img]

  8. #8
    Guest
    Got it! that little bugger it was all because I forgot to input the "/" slashy thingy!

    Thanks everyone! Until next time!
    eaglefire:
    [banging head on wall i am]

  9. #9
    Guest
    Ok, the next question is all the html pages I have, how do I work with them. I read earlier, that if I change them to shtml I can loose placement in search engines. So I dont' want to alter anything.

  10. #10
    ABW Ambassador
    Join Date
    January 18th, 2005
    Location
    ÄúsTrálíĺ
    Posts
    1,372
    add this line to your .htaccess file
    -------
    AddHandler server-parsed .html .htm


    some people notice small drain on the server because every .html file is parsed for ssi stuff, but I've never had any issues.

    some hosts don't like it much either.. try it.

  11. #11
    Guest
    ok, so Now it would go like this:
    [< !--*AddHander server-parsed .html.htm--*>]

    Sorry to be so dense here, but is this all I put in my html pages? isn't there anything else?

    I just can't see this line above will do for me.
    If I have pageone.html
    and all the others are shtml does that line of include go in the html or the shtml? and would this page be blank?
    Trust me I am reading alot on this, just some things aren't clicking yet.

  12. #12
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    705
    No, you put it in your .htaccess file. The file is usually found in your root web directory and you can edit it in Notepad. It tells the server to handle every page like it is shtml without you having to change every page from html to shtml.

    Mike

    [ 07-24-2002: Message edited by: Dr. Evil ]

  13. #13
    Guest
    Mike, ok, opened the txt and put that in.
    Its the only thing in there.
    Now do I make an include for that in to all my pages? or it works automatically?

  14. #14
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    705
    Did you put it in your .htaccess file or a new text document?

  15. #15
    Guest
    OH great, I uploaded that, and my pages werent' found. none of them. So I deleted it from my ftp and directory.
    I just got done reading the apache site.
    Where does the htaccess file go when I upload it. Its not supposed to go to where everything else is apparently, and is that all I do with it? just upload it and forget it?

  16. #16
    pph Expert! Gordon's Avatar
    Join Date
    January 18th, 2005
    Location
    Edmonton Canada
    Posts
    5,781
    Once you have made the .htaccess you just ignore it. You do not do anything with it.

    The only include you make is for the actual content you want to put in the orignal .html file.

  17. #17
    pph Expert! Gordon's Avatar
    Join Date
    January 18th, 2005
    Location
    Edmonton Canada
    Posts
    5,781
    rewardme

    Check that your server will aloow you use .htaccess some will not allow it.

  18. #18
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    705
    It goes in your main directory where your pages and subdirectories are at. Some hosts it is /web and some it is /www. It will do everything automatically when it is uploaded.

    Mike

  19. #19
    Guest
    I put it in the htaccess file.
    then my site disappeared.

  20. #20
    Guest
    Yes I put it in my www folder, here they actually use http as the directory I am to upload everything to.

    I guess they do allow htaccess, it made my site disappear, so it worked I think, but I had to remove it from the server in order to make my site appear.

    I am reading alot as I go here and with your help, but I just can't get the htaccess where it belongs to where my site is still viewable now. Otherwise, I think I am almost done with this part.

  21. #21
    ABW Ambassador
    Join Date
    January 18th, 2005
    Location
    ÄúsTrálíĺ
    Posts
    1,372
    OK.. sometimes crazy things happen with some hosts.

    I had this happen once.
    What I did was:
    create a .htaccess with absolutely nothing in it, and upload that to the directory you uploaded the previous .htaccess too.

    If you want (& your computers handles it), Doc & I are in the chat HERE at the moment.
    We'll talk you through it [img]/infopop/emoticons/icon_smile.gif[/img]

  22. #22
    Newbie
    Join Date
    January 18th, 2005
    Posts
    34
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by rewardme:
    I guess they do allow htaccess, it made my site disappear, so it worked I think, but I had to remove it from the server in order to make my site appear.
    <HR></BLOCKQUOTE>

    That happens a lot actually. Access configuration files are one of the most tempermental features of Apace: one mistake in .htaccess is often enough to make the server block the whole site.

    Looking back at your earlier post:

    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>
    < !--*AddHander server-parsed .html.htm--*>
    <HR></BLOCKQUOTE>

    .htaccess is not an HTML file. Don't use the HTML comment syntax. It's just:

    <pre class="ip-ubbcode-code-pre">
    AddHandler server-parsed .html .htm
    </pre>

    An alternate directive is allowed (and necessary for older versions of Apache). You might want to try this instead:

    <pre class="ip-ubbcode-code-pre">
    AddType text/x-server-parsed-html .html .htm
    </pre>

    If it's still not working, your webhost may have SSI turned off. Try turning it on again by making this the first line of .htaccess:

    <pre class="ip-ubbcode-code-pre">
    Options Includes
    </pre>

    But that only works if the server administrator is letting you override his preferences on a per-directory basis, so if it doesn't help, you should probably just ask your web host what's allowed and what's not.

    One final, trivial thing: I don't know what your file tranfer software defaults to, but make sure .htaccess is world-readable just like your .html files. "chmod 644", if you need to go the command-line route.

  23. #23
    Guest
    Thank you islander. I'm still learning and playin around with it now.

    I printed this out for future use.

  24. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Adsense and ssi
    By Cursal in forum Building Traffic, Newsletters & Advertising
    Replies: 3
    Last Post: January 6th, 2004, 01:11 PM
  2. Need help With SSI
    By Doug247 in forum Programming / Datafeeds / Tools
    Replies: 1
    Last Post: December 8th, 2003, 08:35 PM
  3. ssi?
    By buyyourstuff in forum Cusimano.com Scripts
    Replies: 1
    Last Post: April 4th, 2003, 11:49 PM
  4. Simulating SSI
    By TH Media in forum Programming / Datafeeds / Tools
    Replies: 24
    Last Post: March 15th, 2002, 06:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •