Results 1 to 5 of 5
  1. #1
    Full Member ahmar's Avatar
    Join Date
    January 18th, 2005
    Posts
    481
    I want to include things like header, footer, nav bar etc on each page. As far I know all these files should be saved in root directory and should be called from there.

    Question is:

    1 - How can I include these files in the pages located inside the sub-directories? What I have read according to that these files should be located in the same directory. Is there any way that I can include them on the pages irrespective of what directory they are saved in.

    2 - iFrames I know are not recommended as far as SEs are concerned. Are includes crawlable or SE friendly?

    Thanks in advance for the help.
    <DT>[size=1][color=navy]"The best measure of a man's honesty isn't his income tax return.[/color][/size]<DT>[size=1][color=navy]It's the zero adjust on his bathroom scale." Arthur C. Clark[/color][/size]</DT>

  2. #2
    Defender of Truth, Justice and the Affiliate Way
    Join Date
    January 18th, 2005
    Location
    The Swamp
    Posts
    7,503
    You can save your include pages anywhere you would like. Many people put their includes in their own directory (ie set up a directory called "includes") just for better site organization. You just need to make sure that you put the correct path for their location for where ever you have uploaded the include pages.

    If you want the pages you are calling the includes from to have not use the .shtml file extension, but to keep say .htm/.html extensions for your pages then you need to add an entry to your htaccess page for this to happen. The key is where your htaccess page is related to where your web pages and include files are. My own personal experience has been that where the htaccess file needs to be has varied between different hosting companies I've used.

    Since SSI's are nothing more than having your web page parsed (ie generated on the fly) each time the page is called, SE's basically see the exact same page the end user is seeing not the page you uploaded with the SSI calls in it. They do just fine and dandy with the SE's. Where ever you save your include pages to however you will probably want to put your robot.txt file not to have the SE's spider that directory unless you want the particular include page itself to possiby show in the SE's. Probably something you don't want to have happen.

    Personally, I think SSI's are the best thing to happen since white bread. I absolutely love them.

  3. #3
    Full Member ahmar's Avatar
    Join Date
    January 18th, 2005
    Posts
    481
    Thanks a lot Kellie, honestly I could have never asked for the better explanation.
    <DT>[size=1][color=navy]"The best measure of a man's honesty isn't his income tax return.[/color][/size]<DT>[size=1][color=navy]It's the zero adjust on his bathroom scale." Arthur C. Clark[/color][/size]</DT>

  4. #4
    ABW Ambassador Nature Boy's Avatar
    Join Date
    January 18th, 2005
    Location
    Tennessee
    Posts
    1,423
    Just have to add...

    If the files are set up in a seperate directory, you have to use this code:
    &lt;!--#include virtual="/directory_the_files_are_in/filename.htm"--&gt;

    If the file is in the same directory:
    &lt;!--#include file="filename.htm" --&gt;
    Scott
    If you can't dazzle them with brilliance, then baffle them with bulls#!t
    Don't tell me that you'll do it... SHOW ME.
    Just because everyone else is drinking it is no reason for me to drink the KOOL-AID.

  5. #5
    Full Member ahmar's Avatar
    Join Date
    January 18th, 2005
    Posts
    481
    Thanks Scott, before Kellie's post, I always thought that includes files should be in the same directory as the pages. Thanks to you and Kellie now I know they can be used as any other file/image. Just save them on any directory and define the path in the include command.

    Thanks again.
    <DT>[size=1][color=navy]"The best measure of a man's honesty isn't his income tax return.[/color][/size]<DT>[size=1][color=navy]It's the zero adjust on his bathroom scale." Arthur C. Clark[/color][/size]</DT>

  6. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Need help With SSI
    By Doug247 in forum Programming / Datafeeds / Tools
    Replies: 1
    Last Post: December 8th, 2003, 08:35 PM
  2. ssi?
    By buyyourstuff in forum Cusimano.com Scripts
    Replies: 1
    Last Post: April 4th, 2003, 11:49 PM

Posting Permissions

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