SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru godsfshrmn's Avatar
    Join Date
    Mar 2001
    Posts
    671
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Error Log Question

    My site is basically an image host service. The user calls the image via /sig/<id>.png, which is redirected to /sig.php?id=<id> via mod_rewrite:

    Code:
    RewriteEngine On
    RewriteRule ^sig/(.*).png /sig.php?id=$1
    The path the user calls the image from is the true path. They are redirected through the sig.php file to log the image hit.

    When a image does not exist (checked with file_exists()), it looks like the mod_rewrite still redirects, but a 404 is added to my error log - not error_log, but the true log file. In the sig.php file the image is only called if the file exists, if it does not an 'error image' is sent to the browser.

    Is it possible to not log 404 errors from missing signatures? Its hard to find the real website errors because they are covered up by these 404 image errors. --- better idea: Can I turn off error logging for a specific directory?
    s c r i p t s f o r y o u . n e t
    ScriptsForYou

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    Mar 2006
    Posts
    6,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    my rewrite method is basically the same thing as yours, and i dont get entries in my log file

    the log file im checking, is the one defined in httpd.conf by
    ErrorLog logs/error.log

    are you talking about a diff log file?

  3. #3
    SitePoint Guru godsfshrmn's Avatar
    Join Date
    Mar 2001
    Posts
    671
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure. I assumed it was the server logs. I am looking at the 'last 300 errors' from cPanel. Its not a file download, just displayed in browser.
    s c r i p t s f o r y o u . n e t
    ScriptsForYou


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •