Is it possible to configure Apache to do the following

Discussion in 'Apache' started by stephan2307, Aug 8, 2011.

  1. #1
    I have a server which receives small amount of data from loads of wireless devices (data is small just latitude, longitude, direction and then an 0 or 1). Each device is sending a request every 0.5 seconds and then some more depending on certain events that happen.

    now the server records that data and stores it in a db. I do this via a php script. the php script outputs nothing but the server still returns the nothing along with the usual header. Now I was wondering if it is possible to tell apache not to send any responses if a certain php file is requested.

    Hope I managed to give enough information. If not just ask.

    Thanks in advance for any suggestion. 
     
    stephan2307, Aug 8, 2011 IP
  2. helpinghost

    helpinghost Active Member

    Messages:
    36
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    53
    #2
    I'm not sure if you can remove the header completely. However, you can at least manipulate it a lot if mod_headers is installed on your Apache.
    I think header unset would be the basic option.
    If you wrap this into a <Location> tag that matches the PHP file you do not want to return anything, you might get the result you want.
    You can put this into a .htaccess file to test it out.
     
    helpinghost, Aug 8, 2011 IP
  3. rndm

    rndm Greenhorn

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #3
    The probably won't help, but when ran from the command line you can pass -q to suppress header info
     
    rndm, Aug 19, 2011 IP