Forum Moderators: phranque
getting back into things
we have a new leased web server
i have total ssh access to box
for 5 years - 4 different web servers we have successfully used htaccess to add handler and parse html pages to use includes
we have done this to include files and well as to serve wep pages with data based on user agents
htaccess is 'working' on this web site ( i had to modify http.conf for the site to accept htaccess - otherwise we got internal server error)
ok here goes
this htaccess file will no longer get the job done - the ssi is not parsed and the ssi tag is viewable on web page view source
htaccess
Options Includes +ExecCGI
AddType text/x-server-parsed-html .html .htm
DirectoryIndex /index.html
and the ssi tag that is no longer parsed
<!--#include virtual="/folder1/file-counter.cgi?site=one"-->
the folder and file are good and in the web site tree
now i change htaccess file to this
Options Includes +ExecCGI
AddType text/html .html
AddHandler server-parsed .html
with same ssi tag
<!--#include virtual="/folder1/file-counter.cgi?site=one"-->
file is now parsed but we get this error displayed on web page "[an error occurred while processing this directive] "
ok so i go to web server log file and find this error message
ErrorDocumen$[Wed Mar 29 17:05:14 2006] [error] [client my ip removed] missing directive name$ name in parsed document
how do i bring ssi in parsed html back to life?
we are using unix server with blue quartz server software
many thanks for help - this has been killing me :)
this is not just the file - also effects 'if' ...
this htaccess
Options Includes +ExecCGI
AddType text/x-server-parsed-html .html .htm
<!--# if expr="\"$HTTP_USER_AGENT\"!= /Mozilla¦MSIE¦Opera¦Lynx¦WebTV¦NCSA Mosaic/" -->
info here info here whatever we need here goes here
<!--#endif -->
this does not parse at all anymore but change htaccess as outlined above we get errors as stated above...
i do not get it...
i see it is corrupted - Premature end of scrip headers
so this tells me we are parsing the virtual file just fine and the error message is strictly regarding
<!--# if expr="\"$HTTP_USER_AGENT\"!= /MozillaŠMSIEŠOperaŠLynxŠWebTVŠNCSA Mosaic/" -->
info here info here whatever we need here goes here
<!--#endif -->
this is causing this display in webpage "[an error occurred while processing this directive]"
and this error in web server error_log "missing directive name in parsed document"
how do i get this 'if' working again?
many thanks
My hero for the day!
this htaccess
AddType text/html .html
AddHandler server-parsed .html
Options Indexes FollowSymLinks Includes
now works with
changes you suggested
i had to do same to closing tag...
<!--#endif -->
i would really like to know how - why...
i have used this the 'old' way for many years on many unix - apache boxes...
how is this explained?
a great many thanks...
Iggy
in fact i think i picked it up here some 5 years ago...
see this google search ...
[google.com...]