this would seem like a mission for htaccess (for apache) and not JS. lookup apache mod_rewrite ----------- אריה גלזר 052-5348-561 5561
On Tue, Nov 24, 2009 at 21:34, Sudheer <[email protected]> wrote: > Hi, > > I have a question regarding how to specify a URL for a JSON request. > Here is my directory structure > > htdocs > | > |----members > | |---MyHome.php > | |---fetchMyOrders.php > | > |----common > > My current JSON request looks like as follows and it works fine. (I > have provided only partial code here) > var ajaxRequest = new Request.JSON({ > url: "fetchMyOrders.php", > method: 'get', > async: false, > . > . > > I can move the file fetchMyOrders.php to "common" directory and change > the url part of the request to "../common/fetchMyOrders.php" and that > works too. > > Now the question is, is there a way by which I can provide this path > in a more elegant way and not specify the whole "../common" part of > the URL? Actually I will put a lot of PHP scripts in that "common" > directory and I don't want anyone looking at my JS code to figure out > the directory structure of the server. > > Thanks > Sudheer >
