Results 1 to 5 of 5
December 14th, 2004, 06:34 AM #1
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.
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>
December 14th, 2004, 07:19 AM #2
- Join Date
- January 18th, 2005
- The Swamp
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.
December 14th, 2004, 07:50 AM #3
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>
December 14th, 2004, 02:12 PM #4
Just have to add...
If the files are set up in a seperate directory, you have to use this code:
If the file is in the same directory:
<!--#include file="filename.htm" -->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.
December 14th, 2004, 09:21 PM #5
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>