ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Link to file generated, but cannot download "requested url...not found on this server"

January 05, 2011 2:42pm

Subscribe [5]
  • #1 / Jan 05, 2011 2:42pm

    Dr. Seuss

    58 posts

    Hi,

    I am generating a list of files to download thus:

    {exp:channel:entries channel="static" status="Closed"}
        {downloads1 wrap="link"}
        {downloads2 wrap="link"}
        {downloads3 wrap="link"}
        {downloads4 wrap="link"}
        {/exp:channel:entries}

    The fields “downloads1, downloads2, downloads3, downloads4” are file fields and appear to be populated correctly by selecting from the appropriate upload section.

    The resulting file list links appear to generate perfectly, but when I click on a link I get “Not Found The requested URL /doc/test_pdf_1.pdf was not found on this server.”

    The path appears to match the value described in the File Upload Preferences “URL of Upload Directory”.

    Any ideas as to what I am doing wrong would be greatly appreciated.

  • #2 / Jan 06, 2011 2:19am

    John Henry Donovan

    12339 posts

    Dr. Seuss,

    What version and build of EE do you have installed?
    Do you have any add-ons?

    The path appears to match the value described in the File Upload Preferences “URL of Upload Directory”.

    Try adding the absolute URL here to your doc directory rather than a relative one.

  • #3 / Jan 06, 2011 10:44am

    Dr. Seuss

    58 posts

    Okay, I have made the path explicit.  Now, it does not give me the “Not found” error message, but it also does not give me the file to download either.  IN fact, it simply returns me to the home page, even though the URL in the address bar looks like it should be loading the correct file.

    Here is an example address:  http://www.gettherebrand.com/index.php?doc/test_word1.doc


    Here is my list of installed modules:

    Blacklist/Whitelist   3   Installed
    Blogger API   2   Installed
    Channel   2.0.1   Installed
    Comment   2.1   Installed
    Email   2   Installed
    Emoticon   2   Installed
    IP to Nation   2.2   Installed
    jQuery   1   Installed
    Mailing List   3   Installed
    Member   2   Installed
    Metaweblog API   2   Installed
    Moblog   3   Installed
    Pages   —  Not Installed
    Query   2   Installed
    Referrer   2   Installed
    RSS   2   Installed
    Search   2   Installed
    Shoutbox   1   Installed
    Simple Commerce   2   Installed
    Statistics   2   Installed
    Structure   38385   Installed
    Updated Sites   2   Installed
    Wiki   2.1   Installed
    Wygwam   39114   Installed

    My version of EE2 is:

    ExpressionEngine v2.1.1 - Build:  20101020

    btw, the issue was extant before “Wygwam” was installed.

    tia

    Seuss

  • #4 / Jan 06, 2011 5:32pm

    Ingmar

    29245 posts

    Are you using mod_rewrite or any other kinds of server side rewriting?

  • #5 / Jan 06, 2011 5:47pm

    Dr. Seuss

    58 posts

    Yes.  Following are the contents of my .htaccess file (which I must use soon in this project in order to support implementing Multi-Site Manager on Engine Hosting):

    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^customers.gettherebrand.com [NC]
    RewriteCond %{REQUEST_FILENAME} !customer/
    RewriteRule ^(.*)$ customer/$1 [L]
  • #6 / Jan 07, 2011 10:03am

    Ingmar

    29245 posts

    Can you please try without server side rewriting? It’s for testing only.

  • #7 / Jan 07, 2011 10:52am

    Dr. Seuss

    58 posts

    Changed .htaccess to:

    ## RewriteEngine On
    ## RewriteBase /
    ## RewriteCond %{HTTP_HOST} ^customers.gettherebrand.com [NC]
    ## RewriteCond %{REQUEST_FILENAME} !customer/
    ## RewriteRule ^(.*)$ customer/$1 [L]

    ...and tested.  Getting the same result as before.

    Would access to the system assist in trouble-shooting this?  I can set an account to facilitate this.

  • #8 / Jan 07, 2011 4:26pm

    Sue Crocker

    26054 posts

    Hi, Dr. Seuss.

    Here is an example address:  http://www.gettherebrand.com/index.php?doc/test_word1.doc

    Notice you have a missing / between index.php? and the filename.

  • #9 / Jan 07, 2011 4:58pm

    Dr. Seuss

    58 posts

    So, it should be:

    <a href="http://www.gettherebrand.com/index.php?/doc/test_word1.doc">http://www.gettherebrand.com/index.php?/doc/test_word1.doc</a>

    ...instead of:

    <a href="http://www.gettherebrand.com/index.php?doc/test_word1.doc">http://www.gettherebrand.com/index.php?doc/test_word1.doc</a>

    But when I chantge the link manually and paste it in the address bar to test, I still get the same result.  That is, it goes to the home page.

  • #10 / Jan 09, 2011 4:53pm

    Greg Salt

    3988 posts

    Hi Dr. Seuss,

    Do these files actually exist on the server and are their permissions correct?

    Cheers

    Greg

  • #11 / Jan 09, 2011 9:50pm

    Dr. Seuss

    58 posts

    Hi, Greg.

    Yes, the files are exist at “/uploadtemp/dox” and the permissions at that directory are “777”, recursive.

    The test files are:

    test_xls_1.xls
    test_word1.doc
    test_ppt_1.ppt
    test_pdf_1.pdf

    As mentioned earlier, the files are “selected” from a listing that EE 2 presents, so the filename and path are not entered by the user—they are generated by EE.

    Hope this helps.

  • #12 / Jan 10, 2011 9:53am

    Sue Crocker

    26054 posts

    What is doc in this context?

  • #13 / Jan 11, 2011 12:26pm

    Dr. Seuss

    58 posts

    By your question, I am inferring that you are asking what is this directory:

    /uploadtemp/dox

    I made a “File Upload Preference” called “Documents”.  From this preference users can select a file from a list of the files available in the “* Server Path to Upload Directory” path which happens to be “/www/eh14584/uploadtemp/dox/” and contains the files previously listed.


    Currently as a result of this troubleshooting effort, the value of the corresponding “* URL of Upload Directory” is “http://www.gettherebrand.com/index.php?/doc/”.

    The directory and files contained within have permissions of “777”.

    I appreciate the continued effort.

  • #14 / Jan 12, 2011 4:07am

    John Henry Donovan

    12339 posts

    Dr. Seuss,

    Server Path to Upload Directory” path which happens to be “/www/eh14584/uploadtemp/dox/” and contains the files previously listed.

    That folder is below the root. Move it up into public_html/dox/

    Currently as a result of this troubleshooting effort, the value of the corresponding “* URL of Upload Directory” is “http://www.gettherebrand.com/index.php?/doc/”.

    This should be http://www.gettherebrand.com/dox/

  • #15 / Jan 12, 2011 5:28pm

    Dr. Seuss

    58 posts

    Okay, we seem to be closer, but either I am confused there is something still wrong.

    I have moved the files to:

    /public_html/_assets/dox

    Now, if I test retrieve a file via the explicit path, it works.  For example:

    http://www.gettherebrand.com/_assets/dox/test_pdf_1.pdf

    However, when I am configuring file uploads for “Documents”, I set “* URL of Upload Directory” to be “http://www.gettherebrand.com/doc/”.  When expression engine renders the path to the document above, you get “http://www.gettherebrand.com/doc/test_pdf_1.pdf”.  This file returns the error “Not Found The requested URL /doc/test_pdf_1.pdf was not found on this server.”

    So, basically the re-mapping of the path does not seem to be working.

    More ideas?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases