Jump to content
alexfung

3 .htaccess Problems

Recommended Posts

I am new to web programming. And I can't make these options work. Not even make them "work as intended".

 

<Location /test/alex.txt>

SetHandler application/x-httpd-php

</Location>

 

gives me a 500 Internal Server Error. Same when without the SetHandler directive. What's wrong with my <location>?

 

Changing it to Files worked:

<Files alex.txt>

SetHandler application/x-httpd-php

</Files>

but why the original one crashed?

 

 

Similarly:

ExpiresActive On

ExpiresByType text/xml A3600

ExpiresByType text/html A300

 

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?

 

Finally the XBitHack. I added

XBitHack Full

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?

 

Thanks for reading.

Share this post


Link to post
Share on other sites
Finally the XBitHack. I added

XBitHack Full

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?

 

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.

 

Update: "XBitHack on" works fine for me (hurray!!). This is a lot better than forcing all .html files to be parsed :tchrocks:

Edited by a__kc

Share this post


Link to post
Share on other sites

While I dissagree about the performance hit by parsing all files for SSI or php

Years ago this was an issue with single processors and less ram

but with todays quad 2 gig+ processors and gigabytes of ram

you will be hard pressed to find a performance hit.

So I am not sure its worth the trouble, but I did find this

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...