Ready to get started?Download WordPress


Podpress stats not working since server migration (5 posts)

  1. talie2
    Posted 2 years ago #

    I haven't been able to get podpress stats to work since I moved my site to a new server. I have been using the default WP Permalinks method.

    I notice now, with stats activated, my old stats show up fine, but my podcast URLs are converted from something like: http://mysite.net/audio/podcastep.mp3 to: http://mysite.net/podpress_trac/web/11998/0/podcastep.mp3

    This sounds like something that should happen if the "Optional files podpress_trac" option is selected perhaps?

    Any suggestions on how to get this working again? I hate not being able to monitor downloads.


  2. talie2
    Posted 2 years ago #


  3. ntm
    Plugin Author

    Posted 2 years ago #

    This sounds like something that should happen if the "Optional files podpress_trac" option is selected perhaps?

    No. This is totally normal. PodPress masks the URLs with this scheme /podpress_trac/web/123/example.mp3 temporarily as long as this function is active.
    With this scheme podPress counts the clicks and uses the info from the scheme to set the click in to a relation with a download type, post id and media file.
    /podpress_trac a key which the podPress counter recognizes and makes him count.
    /web is for clicks at the download links on on of the blog pages. Alternatively it could be play for clicks on the player or feed for downloads from one of your Feeds.
    /123 or any other number is the post or page ID.

    If someone clicks on such a link then podPress will count the click and redirect the request to the original URL. (You may test that open one of the download links in a new web browser tab. Watch the address bar.)

    That is how it probably worked in your old blog too. (This stats method of podPress has always worked this way.)

    The option on the General Settings page of podPress says podtrac (and not podpress_trac). That something different. But your are right. If you activate this option then podPress will alter original during the redirection to make it possible for PodTrac to count the downloads too. But you need an account of this service if you want to use it.


  4. talie2
    Posted 2 years ago #

    But this process is currently changing links to something else means that the files don't play/download because the files don't exist in that location.

    Is there something in a .htaccess files that needs to be added? My server doesn't use .htacces instead they "translate it to a static configuration in NGINX" I I need to know what data would be written to the .htaccess file if that's the case.

  5. ntm
    Plugin Author

    Posted 2 years ago #

    podPress uses the default .htaccess lines of WP (see http://codex.wordpress.org/Using_Permalinks#Where.27s_my_.htaccess_file.3F) and it does not need or adds further conditions or rules.

    podPress grabs on page/file request (via the WP hook 'plugins_loaded') the URL and parses it ($podPress_x = @parse_url($_SERVER['REQUEST_URI']), counts the click and redirects the request to the original URL by sending a new HTTP header with these functions:

    header('X-PodPress-Location: '.$realURL, true, 302);
    header('Location: '.$realURL, true, 302);
    header('Content-Length: 0');

    You can find these lines in the podpress_functions.php file.

    status_header is a WP function. The other one (header) is a standard PHP function.
    But maybe the line with X-PodPress-Locatio... makes trouble on your server.
    It would be great if you could to a test and deactivate this line by setting a double slash in front of the line:

    //header('X-PodPress-Location: '.$realURL, true, 302);

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic