WordPress.org

Ready to get started?Download WordPress

Forums

WP-Piwik
WP-Piwik test script returns HTTP/1.1 307 (2 posts)

  1. NicoMorrison
    Member
    Posted 7 months ago #

    I cannot get WP-Piwik to recognise Piwik, the test script returned:

    [ Moderator note: please wrap code in backticks or use the code button. ]

    <snip>
    *** Test 1/2: SitesManager.getSitesWithAtLeastViewAccess ***
    Using: cURL
    SSL peer verification: enabled
    User Agent:
    Call: http://DOM/piwik/?module=API&method=SitesManager.getSitesWithAtLeastViewAccess&format=XML&token_auth= + TOKEN
    Result:
    HTTP/1.1 307
    LOCATION: https://DOM/piwik/?module=API&method=SitesManager.getSitesWithAtLeastViewAccess&format=XML&token_auth=[token hidden]
    Content-Length: 0
    
    Time: 3.26s
    
    *** Test 2/2: SitesManager.getSitesIdFromSiteUrl ***
    Using: cURL
    SSL peer verification: enabled
    User Agent:
    Call: http://DOM/piwik/?module=API&method=SitesManager.getSitesIdFromSiteUrl&url=http%3A%2F%2FDOM%2Fwordpress&format=XML&token_auth= + TOKEN
    Result:
    HTTP/1.1 307
    LOCATION: https://DOM/piwik/?module=API&method=SitesManager.getSitesIdFromSiteUrl&url=http%3A%2F%2FDOM%2Fwordpress&format=XML&token_auth=[token hidden]
    Content-Length: 0
    </snip>

    [token hidden] was in fact the correct token from my API. DOM is domain...

    Why am i getting 307 redirect and not 200? I tried disabling ssl peer verification, no difference.

    Thanks in advance,
    Nico Morrison
    London UK.

    http://wordpress.org/plugins/wp-piwik/

  2. braekling
    Member
    Plugin Author

    Posted 7 months ago #

    Why don't you use the https-URL as Piwik URL? So your server does not need to redirect from HTTP to HTTPS. If you are using a valid certificate, you don't need to disable peer verification.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.