/    Sign up×
Community /Pin to ProfileBookmark

Problem using Include file

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” –>

to post a comment
HTML

9 Comments(s)

Copy linkTweet thisAlerts:
@svidgenDec 02.2008 — Are there any differences in permissions between the html and asp variants?

Are they being stored in the same directory?
Copy linkTweet thisAlerts:
@TheBearMayDec 03.2008 — .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....
Copy linkTweet thisAlerts:
@svidgenDec 03.2008 — However, per the Apache documentation, static text files of any type may be included inline using the above directive.
Copy linkTweet thisAlerts:
@lisab00authorDec 03.2008 — None that I'm aware of. They are located in the same directory.
Copy linkTweet thisAlerts:
@TheBearMayDec 03.2008 — However, per the Apache documentation, static text files of any type may be included inline using the above directive.[/QUOTE]

...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.
Copy linkTweet thisAlerts:
@svidgenDec 03.2008 — ASP files are generally found on IIS[/QUOTE]
Touche.

Directions for adding a file extension to be server processed under IIS:

http://www.microsoft.com/technet/pro....mspx?mfr=true[/QUOTE]

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.
Copy linkTweet thisAlerts:
@TheBearMayDec 03.2008 — For Apache you'll find a line similiar to:

[I]AddHandler server-parsed .shtml .html .htm

[/I]


in the .htaccess or http.conf files. This line controls what the server looks at.
Copy linkTweet thisAlerts:
@svidgenDec 03.2008 — AddHandler server-parsed .shtml .html .htm

in the .htaccess or http.conf files. This line controls what the server looks at. [/QUOTE]

I'm aware of these directives. However, they don't control what files can be included--only what files can do the including. Correct?
×

Success!

Help @lisab00 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...