3 .htaccess Problems

liunx

Guest
I am new to web programming. And I can't make these options work. Not even make them "work as intended".<br /><br /><Location /test/alex.txt><br />SetHandler application/x-httpd-php<br /></Location><br /><br />gives me a 500 Internal Server Error. Same when without the SetHandler directive. What's wrong with my <location>?<br /><br />Changing it to Files worked:<br /><Files alex.txt><br />SetHandler application/x-httpd-php<br /></Files><br />but why the original one crashed?<br /><br /><br />Similarly:<br />ExpiresActive On <br />ExpiresByType text/xml A3600<br />ExpiresByType text/html A300<br /><br />nearly copied and pasted from apache doc. Placed in .htaccess, any of these lines crashes any file access. Is it because the module is not loaded with the TCH apache?<br /><br />Finally the XBitHack. I added<br />XBitHack Full<br />I traced the http headers and can't see any effect. I turned several .htm files to 654, and then 755. I can't see any Modified tag generated. Why?<br /><br />Thanks for reading.<!--content-->
<!--QuoteBegin-alexfung+Mar 17 2004, 09:01 AM--><div class='quotetop'>QUOTE(alexfung @ Mar 17 2004, 09:01 AM)</div><div class='quotemain'><!--QuoteEBegin-->Finally the XBitHack. I added<br />XBitHack Full<br />I traced the http headers and can't see any effect. I turned several .htm files to 654, and then 755. I can't see any Modified tag generated. Why?<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />Maybe it's a server-level configuration? Frankly I know little about Apache directives (just enough RewriteRule to get by). It would be useful, though, to be able to make some HTML files behave like .shtml. Otherwise I'd need to change filenames and set up redirects.<br /><br />Update: "XBitHack on" works fine for me (hurray!!). This is a lot better than forcing all .html files to be parsed <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/kicking.gif" style="vertical-align:middle" emoid=":dance:" border="0" alt="kicking.gif" /><!--content-->
While I dissagree about the performance hit by parsing all files for SSI or php<br />Years ago this was an issue with single processors and less ram<br />but with todays quad 2 gig+ processors and gigabytes of ram<br />you will be hard pressed to find a performance hit.<br />So I am not sure its worth the trouble, but I did find this<br />CHMOD the page files, and only the page files, that you want parsed (i.e. that will contain SSI directives) to 744 (instead of 644). This is what tells the server to parse the page.<!--content-->
 
Top