Download Monitor
[resolved] WPMU Compatible? Rewrite returns 404 page. (8 posts)

  1. David Radovanovic
    Posted 2 years ago #

    One day the rewrite works flawlessly, the next it returns 404 errors. After repeated attempted to deactivate/activate, permalink/default permalinks, it still returns 404.

    This should (but, does NOT) bring to download, returns 4040 page -- http://www.hrnerr.org/wp-content/plugins/download-monitor/download.php?id=AgendaHudsonRiverShoreline.pdf

    This is the configured rewrite path to same file which returns 404 page -- http://www.hrnerr.org/documents/AgendaHudsonRiverShoreline.pdf

    This is where the file ACTUALLY resides -- http://hrnerr.thewordpressdesigner.com/files/downloads/2012/08/AgendaHudsonRiverShoreline.pdf

    This is the Rewrite rule in .htaccess file: Options +FollowSymLinks
    RewriteEngine on
    RewriteRule ^documents/([^/]+)$ http://www.hrnerr.org/wp-content/plugins/download-monitor/download.php?id=$1 [L]

    So, it appears that it can't even find the plugin file (... download-monitor/download.php) to process the file?

    Maybe WordPress Multiuser's rewrite rules are interfering with download-monitor's?

    This is a great plugin. Maybe someone would be willing to resume support? Thanks for any help.


  2. Brandon Dove
    Posted 2 years ago #

    Try this rewrite rule. We had a similar problem and this fixed it:

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule ^[_0-9a-zA-Z-]+/documents/([^/]+)$ /wp-content/plugins/download-monitor/download.php?id=$1 [L]
  3. David Radovanovic
    Posted 2 years ago #

    Brandon, thanks for your generous fix. However, the result is the same.

  4. David Radovanovic
    Posted 2 years ago #

    Any suggestions on how to troubleshoot this? I've commented the debug lines in download.php `/* Debug */
    echo "
    URL Parsed: $urlparsed\n
    isUrl: $isURI\n
    localURL: $localURI\n
    BloginfoURL: ".get_bloginfo('url')."\n
    BloginfoWPURL: ".get_bloginfo('wpurl')."\n
    exit;/* */

    Though I still get 404 error page without any print-out on screen of paths for debugging.

  5. Brandon Dove
    Posted 2 years ago #

    David --

    Are you using subdomains for your multisite with domain mapping?

    Try this:

    RewriteEngine on
    RewriteRule ^documents/([^/]+)$ /wp-content/plugins/download-monitor/download.php?id=$1 [L]

  6. David Radovanovic
    Posted 2 years ago #

    Brandon, yes sub-domains with mapping.

    This is what I have in .htaccess:

    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^downloads/([^/]+)$ http://www.hrnerr.org/wp-content/plugins/download-monitor/download.php?id=$1 [L]
    RewriteRule ^index\.php$ - [L]
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    #END WordPress
  7. David Radovanovic
    Posted 2 years ago #

    Here's the page wit the downloads:


    BTW - I recently upgraded to another server. Maybe there is some type of restriction on the new server config?

  8. David Radovanovic
    Posted 2 years ago #

    Brandon, well...it was a basic folder permissions issue. I checked earlier and confirmed that the folders were 755 and files 644... but somehow the uploads and plugins folder were incorrect. So, as Confucius says, "... check the really simple things first, before insisting on making it complicated.” Or something like that. Thanks for your input.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Download Monitor
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic