Author Topic: Simple Download Monitor problems  (Read 52246 times)

pepak

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 936
    • View Profile
    • Pepak.net
Simple Download Monitor problems
« on: November 04, 2009, 11:46:40 AM »
Quote from: "Forge"
Hello Pepak

Your plugin don’t work on my website.
I’ve change the htaccess and place file (zip) into directory named „fichiers“ (i’m french) in the root (/www/fichiers).

- Where the dir „fichiers“ can be place ?
- this is my lines in htaccess :
Code: [Select]
RewriteRule ^(fichiers/.*) /index.php?sdmon=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f

Is it ok ?

Thanks

pepak

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 936
    • View Profile
    • Pepak.net
Simple Download Monitor problems
« Reply #1 on: November 04, 2009, 12:06:10 PM »
Placement of the downloads directory
The downloads directory can, theoretically, be placed anywhere in the directory tree of your website. You just need to make sure that two places are set up accordingly:

1) The .htaccess file located in the root of your WordPress installation (that is, suppose that your WordPress files - wp-config.php and others - reside in /www directory; then you need to edit /www/.htaccess file, not any other .htaccess file you may possibly have) needs to have a RewriteRule added to it:
Code: [Select]
RewriteRule ^(files/.*) /index.php?sdmon=$1 [L]Where files is a relative path to your download directory, relative to that .htaccess file. E.g., if your downloads are placed in /www/deeply/hidden/files and your WordPress is in /www, you will want
Code: [Select]
RewriteRule ^(deeply/hidden/files/.*) /index.php?sdmon=$1 [L]
2) Plugin's configuration needs to reflect the placement as well. The "Allowed directories" will almost always contain the same text as your RewriteRule, before .*. E.g., in the example above, deeply/hidden/files/

Why it doesn't work
That's quite difficult to tell. What exactly happens if you try to download an existing file, e.g. www.yourwebsite.fr/fichiers/public.zip? And what happens if you use www.yourwebsite.fr/index.php?sdmon=fichiers/public.zip instead? If #2 works and #1 does not, your .htaccess file is either wrong or even ignored by your webhost. If neither of them work, it is likely the plugin's configuration is incorrect. I'll need to know which it is before I can suggest further steps.

Forge

  • Newbie
  • *
  • Posts: 5
    • View Profile
Simple Download Monitor problems
« Reply #2 on: November 04, 2009, 12:26:15 PM »
The second soluce " www.yourwebsite.fr/index.php?sdmon=fichiers/public.zip " work perfectely.
I searching to resolve htaccess problem.

I put this link waiting solution.

pepak

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 936
    • View Profile
    • Pepak.net
Simple Download Monitor problems
« Reply #3 on: November 04, 2009, 12:40:30 PM »
That means your .htaccess file is either not working at all - some (many?) webhosts don't allow its use at all or with strict limitations.

What kind of URLs do you use for your WordPress posts? That is, if you post an article about "It is not working!", how exactly will its URL look? Will it be something like www.mywebsite.fr/2009/11/it-is-not-working or rather something like www.mywebsite.fr/index.php?id=123? If it is the first case, your webhost supports .htaccess and we just need to find out what's wrong with yours. The other case could mean that either you didn't even try to use "cool URI's" and left WordPress in its default state (SDM might still work if you write a proper .htaccess), but it could also mean that your webhost doesn't support .htaccess and you won't be able to use SDM at all.

Btw., you don't need to register to be able to post here. Although, registration brings the benefit that you can select your language here and translate the whole forum.

Forge

  • Newbie
  • *
  • Posts: 5
    • View Profile
Simple Download Monitor problems
« Reply #4 on: November 04, 2009, 01:53:14 PM »
It work in the first case.

...to late for inscription ^_^

pepak

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 936
    • View Profile
    • Pepak.net
Simple Download Monitor problems
« Reply #5 on: November 04, 2009, 01:59:25 PM »
If your .htaccess doesn't contain any sensitive data, send it to me (pepak (at) pepak.net) and I'll check it.

Forge

  • Newbie
  • *
  • Posts: 5
    • View Profile
Simple Download Monitor problems
« Reply #6 on: November 04, 2009, 04:08:45 PM »
htaccess sent.

Another question : is it possible to print this count in post ?
Ex: "Myfile donwloaded 30 times"

pepak

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 936
    • View Profile
    • Pepak.net
Simple Download Monitor problems
« Reply #7 on: November 04, 2009, 04:16:49 PM »
Not really. The plugin doesn't even know from which page (if any) the file was linked. Theoretically, I could publish a function which would return a number of downloads that could be called from a template, but it really seems like it'd be out of the intended scope.

As for your .htaccess, I am surprised it works at all :-)
I admit I am no htaccess wizard, though.

Try to replace the two lines with:
Code: [Select]
RewriteBase /
RewriteRule ^(fichiers/.*) /index.php?sdmon=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

pepak

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 936
    • View Profile
    • Pepak.net
Simple Download Monitor problems
« Reply #8 on: November 04, 2009, 04:23:30 PM »
If that doesn't work, it may actually be the case of your webhost not supporting .htaccess. I have just tried accessing the site, and:

1) The site's URLs are not, in fact, "cool URIs" - they are regular PHP links, although in a bit unusual syntax (/index.php/parameters is interpreted by PHP the same way as /index.php?parameters). Still, they work without ANY help from htacceess (what htaccess allows is /parameters).

2) I tried accessing the site with www1. instead of the starting www.. Your htaccess should have rewritten it to a www. form, but it didn't - it just let me go to a www1. version of your site, which leads to an empty directory. So it seems .htaccess is ignored completely. That would, of course, prevent SDM from working.

Forge

  • Newbie
  • *
  • Posts: 5
    • View Profile
Simple Download Monitor problems
« Reply #9 on: November 04, 2009, 04:35:02 PM »
It doesn't work.

This file is on the top of this page with the link "hack" (with index?sdmon=) and "no hack" (simply linked)
http://www.masterfight.net/index.php/diffusez-masterfight/

pepak

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 936
    • View Profile
    • Pepak.net
Simple Download Monitor problems
« Reply #10 on: November 04, 2009, 04:43:05 PM »
I am afraid you will need to contact your webhoster and ask them why .htaccess (or mod_rewrite) is being ignored. Wihout htaccess and mod_rewrite, the plugin can't function as intended (you could still post all your downloads as /index.php?sdmon=fichiers/file.zip, but that would defeat the whole point that the monitor can track downloads even from direct links).

Forge

  • Newbie
  • *
  • Posts: 5
    • View Profile
Simple Download Monitor problems
« Reply #11 on: November 04, 2009, 04:47:25 PM »
Ok i try this.
Thanks a lot for your help and your good job.

Ricardo

  • Guest
Simple Download Monitor problems
« Reply #12 on: November 08, 2009, 11:35:29 PM »
Hi

When using your plugin all the files "covered" by the plugin wont appear on the blog...for example i have a folder onmy server called "images" if i setup simple download monitor to that folder the images wont display on a post:

example:



nothing appears on the blog, if i erase the lines from the .htacess file they appear

What can i do to solve this?

Thanks

pepak

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 936
    • View Profile
    • Pepak.net
Simple Download Monitor problems
« Reply #13 on: November 09, 2009, 06:41:00 AM »
I never actually tried or intended to use the plugin with images. I'll test it and see what can be done.

Ricardo

  • Guest
Simple Download Monitor problems
« Reply #14 on: November 09, 2009, 02:43:53 PM »
i tried other files like swf and same thing happens...by using your plugin i can see who is hotlinking to my files...i dont have acess to the stats on my server so i was hoping your plugin would tell me if anyone hotlinks to my files.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Note: this post will not display until it's been approved by a moderator.
Name: Email:
Verification:
This box must be left blank:

Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture: