HTTPSTATUS always returns code 200

markvl1979markvl1979
When testing an URL's statuscode all URL's returns statuscode 200. Even if it is a 301 or 302 (e.g. http://www.doedegoogleproef.nl).



In previous versions (v7.8.8) you have a *.conf file with the redirects option set to false in the agents directory.



Now in a newer version (8.7.11) the those files are begin deleted automatic if created them by hand.



How do I setup a HTTPSTATUS test with redirect option is off to test the correct http status code of a URL.



Thanks in advance .



Kind regards.



Mark van Leent

Comments

  • AdministratorAdministrator
    Version 8.7.11 is an old version that is no longer supported - you might want to check with the latest release.
  • markvl1979markvl1979
    Version number was wrong (saw this in my IIS logfiles)

    I'm using v9.0.14.



    found serveral more problems with testing URL

    URL option down when result is 500, 404, ... doesn't work for 403.



    Thank in advance
  • AdministratorAdministrator
    Can you clarify what you mean with " doesn't work for 403 "?
  • markvl1979markvl1979
    I have two problems with serverscheck.



    1: URL check has an option Set state to DOWN when server returns an error (505,404,...).

    When testing an URL which returns 403 status and having the option set to NO when server returns an error, the outcome of the test is

    State: DOWN.

    Returned error: 403 forbidden.

    Returned value: 0

    when testing it with a .conf file and url_check it works, but not in the webinterface



    2: HTTP State check returns always code 200 OK even when it is a redirect 301 (www.doedegoogleproef.nl).

    when testing it in a *conf file with option redirect is False in it, it works fine, using url_check. It will return the 301 code which is ok, but in the web interface there is no option of setting the redirect option (to False). Where is this possible?



    Thanks in advance





    Kind regards,



    Mark van Leent
  • AdministratorAdministrator
    Do you mean running the URL_check with the conf file from the command prompt?



    That component is no longer in use with the ServersCheck releases as of release 8.5
  • markvl1979markvl1979
    Yes i mean url_check from command prompt?

    Which command is then used?
  • AdministratorAdministrator
    it is a built-in functionality now and no longer an external command
  • markvl1979markvl1979
    What is then the correct way to test 301 and 302 url redirections?

    And waht is the correct way to test if a certain text is shown when a 403 error occurs?




  • AdministratorAdministrator
    The HTTPHEADER check will only verify if the expected status code is returned.



    You need the URL check to monitor for a specific text in a 403 event



    9.0.15 has been released and includes a fix whereby it no longer follows redirects.
This discussion has been closed.