0

There are three machines - 1. Server - where application is deployed. Call it Machine1. 2. Second Machine where some files are stored. Call it ABC machine. 3. Machine from which I am accessing the application deployed on Machine1.

Lets say, http://testapplication.com:8080/pagedirectory/viewCart.php

On viewCart.php there are some link displayed like \\ABC\Folder1\file.xml. If I access this path directly by typing or copying to browser, it works and I am able to see file. But If i click on web page, it doesn't open and gives error - The requested URL /pagedirectory/\\ABC\Folder1\file.xml was not found on this server.

If I bring mouse over this link, in the status bar at the bottom of browser, I see

http://testapplication.com:8080/pagedirectory/\\ABC\Folder1\file.xml

So, it seems that it adds base directory from where page is invoked to all the links and hence throws error.

Logs says Found %2f (encoded '/') in URI (decoded = '/somepath')...returning 404 referer in apache logs when I try to click on the above link displayed on the page from my machine. If I access the application on the machine where its hosted, it just works perfect without issues. So what am I doing wrong? I saw in some posts to use AllowEncodedSlashes On but not sure as where to put them and I am not using any virtual hosts.

Please help !!.

anujin
  • 773
  • 7
  • 24
  • 36

1 Answers1

0

A few ideas:

  1. You need to get those "\" turned the other way for your URLs
  2. If its adding the base directory then you may be having relative urls -- if your href="something" it will goto /base/directory/something. But if you use an absolute url href="/something" then it will goto /something
  3. If its not relative URLs check out your apache conf and ensure you dont have some funky rewrite rules going on.
Mike Graf
  • 5,077
  • 4
  • 45
  • 58
  • thanks Mike for the suggestions. But if thats the case, I shouldn't be able to access the URLS by accessing the application from machine where its deployed. So, if I try from Machine1 its fine but from any other machine, its not working. – anujin Sep 25 '12 at 17:42