| 8:03 pm on Sep 17, 2010 (gmt 0)|
What is the underlying server technology?
On *nix, I would do this easily with symlinks - one directory or set of files in a central repository and pointers to them.
As of Vista (at least), Windows can do sym links too (or something very similar). I'm not sure about doing it on other Windows OSes
| 8:40 pm on Sep 17, 2010 (gmt 0)|
Hi, thanks for your response. I'm using asp.net 1.1 on a Windows web server (2003). I've never used symbolic links before so this will be an interesting experience. Do you know of any tutorials out there on the web?
| 9:45 pm on Sep 17, 2010 (gmt 0)|
I've never used them on Windows. On *nix it is extremely common to use them and they are very handy and the concept is quite simple. A simple example would be like this
The files in A and B would appear as
But it's really more or less an alias that maps to the real file.
I use them, for example, to run multiple sites off the same code base (but different databases, so you can't tell by looking that they run on the same code).
As for windows, the concept should be the same, though I don't know if the implementation is as simple. I know only what a Google search tells me:
That's a start.
| 9:49 pm on Sep 17, 2010 (gmt 0)|
Actually, a little looking and symbolic links in Windows are probably not what you want (only available in Vista+ anyway)
You are more like interested in Hard Links or Junctions
This relatively simple concept in *nix though appears rather complicated in Windows.
| 9:51 pm on Sep 17, 2010 (gmt 0)|
Your comments are very helpful! thank you so much for taking the time.
I'm going to give it a try!
I'll let you know if it worked for me.
| 9:59 pm on Sep 17, 2010 (gmt 0)|
Will all the content in the directories be shared (or just some files in them)? If all, you can create a Virtual Directory in IIS that may do what you need.
| 10:09 pm on Sep 17, 2010 (gmt 0)|
Just some files but now I'm thinking of creating just a virtual directory for these shared files alone just to make it easier. This would probably be the best method to try now that you mentioned it! I don't know why I didn't think of it myself! thanks a lot! You've been a great help!
| 5:28 pm on Sep 18, 2010 (gmt 0)|
Thanks LIA - though a Windows user, I've never done anything with a Windows server and I'm always lost as to how to do things equivalent to mod_rewrite, symlinks and such as that.
| 3:35 pm on Sep 20, 2010 (gmt 0)|
That's okay- I have no idea what a symlink is. :)
I'm guessing that it's a pointer to another directory, analogous to a virtual directory on a web server?
| 3:57 pm on Sep 20, 2010 (gmt 0)|
Mmmm.... more like an alias on a web server.
In the *nix world, directories are merely special types of files in general. A symlink is a pointer to another file, but that file can be a file or a directory.
So if I have
/home/ergophobe/site2codebase - which is a symlink to site1codebase
Then the path
is perfectly valid. I could also keep my code outside web root and have something like
/home/ergophob/public_html/site1 => symlink to /home/ergophobe/codebase/
/home/ergophob/public_html/site2 => symlink to /home/ergophobe/codebase/
Then both site 1 and site 2 have valid URLs
And in the script.php file itself I can simply detect the REMOTE_HOST or some other variable to then direct traffic.
| 6:26 pm on Sep 21, 2010 (gmt 0)|
Just wanted to let you know that the virtual directory on windows 2003 server was very easy to do and worked like a charm....Thank you ergophobe for all your help!
| 7:08 pm on Sep 21, 2010 (gmt 0)|
Thanks... but that wasn't my idea.
I think you meant to thank Life in Asia. He's the one who knows about Virtual Directories but not symlinks. I'm the other one ;-)
| 8:30 pm on Sep 21, 2010 (gmt 0)|
Well, I certainly learned a lot about symlinks, so I'll add my thanks as well. :)
| 8:32 pm on Sep 21, 2010 (gmt 0)|
OH, I'm sorry....thanks Life in Asia....You've helped me a great deal!
| 4:54 pm on Sep 22, 2010 (gmt 0)|
And I learned that Virtual Directories exist. So I guess we're all richer for it and that's sort of the point of a discussion forum in the end, isn't it!
So I'll say thanks too.
| 5:20 pm on Sep 22, 2010 (gmt 0)|
*sniff* I think I need a hanky... :)
| 6:05 pm on Sep 22, 2010 (gmt 0)|
Is the link broken for the MIDI track playing We Are the World? I'm not hearing it.