Forum Moderators: phranque

Message Too Old, No Replies

can I write my own logs with shared hosting?

what control do I have?

         

pixeltierra

2:21 am on Oct 7, 2006 (gmt 0)

10+ Year Member



I'm not an apache guru, but it seems I should be able to use an .htaccess file or something to write my own access/error logs. Is this true?

jdMorgan

12:58 pm on Oct 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The Apache log configuration directives are only allowed in the server confuration context -- not in .htaccess.

That leaves you with two other solutions, neither particularly efficient:

You can 'pipe' all requests through a script that logs the request, and then reads and delivers the requested content. This is very inefficient, but comparable to generating pages with PHP or similar.

Another solution is to include an SSI directive on each page that calls a small logging script. While more efficient that the above, it won't work with image, media, CSS, or JS, files, only with 'pages.'

The best solution is to get hosting that meets the needs of your site.

Jim