Click to See Complete Forum and Search --> : Problem using Include file
lisab00
12-02-2008, 04:08 PM
I have a simple navigation bar called navtop.html. When I include it in a new document and save the new doc with an .html extension the nav bar doesn't appear. If I save the new doc with an .asp extension, the nav bar appears fine. Am I missing something if I include it in an .html file? I'm using this simple include code:
<!--#include file="navtop.html" -->
svidgen
12-02-2008, 04:20 PM
Are there any differences in permissions between the html and asp variants?
Are they being stored in the same directory?
TheBearMay
12-02-2008, 06:07 PM
.asp files are server processed before being sent to the browser so the include gets picked up, by default .html files are only served up and are not examined by the server. This can be changed....
svidgen
12-02-2008, 06:19 PM
However, per the Apache documentation, static text files of any type may be included inline using the above directive.
lisab00
12-02-2008, 08:13 PM
None that I'm aware of. They are located in the same directory.
TheBearMay
12-02-2008, 08:14 PM
However, per the Apache documentation, static text files of any type may be included inline using the above directive.
...as long as the file is marked to be processed by the server first.... ASP files are generally found on IIS, and only rarely on Apache.
TheBearMay
12-02-2008, 08:18 PM
Directions for adding a file extension to be server processed under IIS:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/eced0b89-e052-42ff-baa8-751dd191c3b5.mspx?mfr=true
svidgen
12-02-2008, 08:44 PM
ASP files are generally found on IIS
Touche.
Directions for adding a file extension to be server processed under IIS:
http://www.microsoft.com/technet/pro....mspx?mfr=true
I'm interested to see if that resolves the issue. I'm pretty confident that special file extensions don't need to be explicitly listed anywhere to allow them for inclusion under Apache. If that's not the case for SSI in IIS, that might be good to know.
TheBearMay
12-02-2008, 08:48 PM
For Apache you'll find a line similiar to:
AddHandler server-parsed .shtml .html .htm
in the .htaccess or http.conf files. This line controls what the server looks at.
svidgen
12-02-2008, 10:00 PM
AddHandler server-parsed .shtml .html .htm
in the .htaccess or http.conf files. This line controls what the server looks at.
I'm aware of these directives. However, they don't control what files can be included--only what files can do the including. Correct?