WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Sometimes, a 404 (5 posts)

  1. Steven Stern
    Member
    Posted 1 year ago #

    I have a page - http://vnavoundation.net/search-grants/ - that submits a database query.

    Sometimes everything works. Sometimes, the query returns a 404 error.

    I'm not sure why. Can you see any differences?

    Here's the headers from a successful post:

    http://vnafoundation.net/search-grants/
    
    POST /search-grants/ HTTP/1.1
    Host: vnafoundation.net
    User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20100101 Firefox/14.0.1
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip, deflate
    DNT: 1
    Connection: keep-alive
    Referer: http://vnafoundation.net/search-grants/
    Cookie: __utma=160026618.780931792.1345147301.1345147301.1345147301.1; __utmb=160026618.41.10.1345147301; __utmc=160026618; __utmz=160026618.1345147301.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __qca=P0-1307619254-1345147301992; wfvt_-1508397388=502d564995a6e
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 56
    agency=&amount=40000&year=2012&service=&searching=submit
    HTTP/1.1 200 OK
    Date: Thu, 16 Aug 2012 20:21:38 GMT
    Server: Apache
    X-Pingback: http://vnafoundation.net/xmlrpc.php
    Link: <http://wp.me/P2DU9x-H>; rel=shortlink
    Set-Cookie: wfvt_-1508397388=502d5653ebf78; expires=Thu, 16-Aug-2012 20:51:39 GMT; path=/
    Keep-Alive: timeout=15, max=97
    Connection: Keep-Alive
    Transfer-Encoding: chunked
    Content-Type: text/html; charset=UTF-8

    and here's the headers from a failure

    http://vnafoundation.net/search-grants/
    
    POST /search-grants/ HTTP/1.1
    Host: vnafoundation.net
    User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20100101 Firefox/14.0.1
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip, deflate
    DNT: 1
    Connection: keep-alive
    Referer: http://vnafoundation.net/search-grants/
    Cookie: __utma=160026618.780931792.1345147301.1345147301.1345147301.1; __utmb=160026618.33.10.1345147301; __utmc=160026618; __utmz=160026618.1345147301.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __qca=P0-1307619254-1345147301992; wfvt_-1508397388=502d55bcdcfcd
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 56
    agency=&amount=80002&year=2009&service=&searching=submit
    HTTP/1.1 404 Not Found
    Date: Thu, 16 Aug 2012 20:19:29 GMT
    Server: Apache
    X-Pingback: http://vnafoundation.net/xmlrpc.php
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Cache-Control: no-cache, must-revalidate, max-age=0
    Pragma: no-cache
    Set-Cookie: wfvt_-1508397388=502d55d338cc3; expires=Thu, 16-Aug-2012 20:49:31 GMT; path=/
    Last-Modified: Thu, 16 Aug 2012 20:19:31 GMT
    Keep-Alive: timeout=15, max=100
    Connection: Keep-Alive
    Transfer-Encoding: chunked
    Content-Type: text/html; charset=UTF-8
  2. Steven Jones
    Member
    Posted 1 year ago #

    Link doesn't work for me.

    Are you using "name" as the name of one of the input fields (if you're using input fields?

  3. Steven Stern
    Member
    Posted 1 year ago #

    It would be a lot more helpful if I gave you the right spelling of the site!

    http://vnafoundation.net/search-grants/

    "name" is not one of the post fields.

  4. Steven Stern
    Member
    Posted 1 year ago #

  5. Steven Stern
    Member
    Posted 1 year ago #

    Steve Jones, you were on the right track. "year" was a parameter and WordPress was grabbing it and doing something.... not sure what. Anyhow, I changed the field from "year" to "grantyear" and now it works.

    Moral: Don't assume WordPress will know what you want it to ignore!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags