• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Viewing log files in CI

I'm using CI on a few different sites.

On one site I can view the log files at http://mysite.com/application/logs/log.php

log.php is apparently a log file viewer written by Chris Petermann. For the life of me I can't remember putting it in my logs directory. I searched CI, but came up with nothing.

Anyway, I can't figure out what is allowing me access to that file on that site.
I'd assume it would be obvious in .htaccess
allow from all
Options -Indexes
Options +FollowSymLinks
Options -MultiViews
DirectoryIndex index.php
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [NC,L,QSA]

<IfModule !mod_rewrite.c>
  ErrorDocument 404 index.php
But it's not.

Anyone have any ideas? Or any good suggestions about viewing log files?


AJAX Logfile Tailer & Viewer

That logfile viewer looks great, but I still can't figure out how to allow access to the log files at application/logs/.

If I understand correctly, my .htaccess file basically says if the URL being requested isn't a file or directory then let CI handle it through index.php.

I don't understand why I can access the log files on one site but get a 404 on another. The .htaccess and file structure are identical on both sites I'm working with.

I tried switching the rewrite conditions to
RewriteCond $1 !^(index\.php|public|application|images|css|js|robots\.txt|favicon\.ico)
but I still get a 404 error when trying to access http://mysite.com/application/logs/log.php

What am I missing? Something simple?

RewriteCond $1 !^(index\.php|public|application|logs|images|css|js|robots\.txt|favicon\.ico)

Make sure that you have read/write access to the directory!

You need to turn that code int a controller...

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.