We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3647
    • 177 Posts
    Hi

    Hoping someone may have the answer to my pain!

    Really struggling with the excellent FileDownload snippet and how it seems to interact with friendly URL’s

    The ’normal’ pages are working fine, but any listing which involves a download is listed as

    http://www.domain.com/index.php?q=83/filename.pdf

    And clicking on it gets a 404 error

    BBloke came closest in this posting as he describes the exact problem

    http://modxcms.com/forums/index.php/topic,16498.msg105046.html#msg105046

    but his solution was a little vague (to a newbie such as myself) as I don’t know which directory he is referring to and I don’t have access to http.conf on this shared server.

    After much lurking on the forums, have tried removing trailing ’/’ from the TV on the page
    that didn’t seem to make any difference at all

    Checked that the template had
    <base href="[(site_url)]" />
    again, didn’t seem to make a difference

    Tried disabling the plug-in

    Rewrite rule is
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([^/]*)/?(.*)$ index.php?q=$1&d=$2 [L,QSA,NC]

    Settings in Configuration are:
    Prefix index.php?q=
    Suffix none

    Can anyone please help!!!

    (If I turn off Friendly URL’s everything works fine - which I would go with except this particular site really want to use the alias e.g. domain.com/member - and that doesn’t work if you turn them off)

    Have a site ready to go live except for this problem, so getting desperate
    Any suggestions appreciated!

    Mark


      • 22303 MODX Staff
      • 10,725 Posts
      Why in the world is your friendly url prefix "index.php?q="?
        • 3647
        • 177 Posts
        LOL

        That’s a fair question OpenGeek, which I don’t have a good answer for!

        (In the old days it was to remove the id= which at that time was against Google webmaster guidelines)

        but do you think that is causing the problem? What do you think I should use?

        Mark
          • 22303 MODX Staff
          • 10,725 Posts
          Are you using friendly URL’s without the MODx rewrite rules in .htaccess for some reason? That would be the only reason to use that prefix you had...and if so, I would not do that anymore; it likely is not compatible with a number of add-ons, such as the FileDownload plugin.