You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Victor B. Gonzalez" <ap...@vbgunz.com> on 2003/10/07 00:55:38 UTC

[users@httpd] How to make two directories share one url?

Hello Apache Users,

I would like to make one directory on my machine share the htdocs
directory... In other words I do not wish to put some content directly
into the htdocs directory but would like that content to be accessible
through the htdocs directory.

I.e. htdocs currently has four files in it. Another directory called
webroot has four files in it. It would be nice if a person can reach
all files through one path...

      www.shareddocs.com/1.php  (htdocs)
      www.shareddocs.com/2.php  (htdocs)
      www.shareddocs.com/3.php  (htdocs)
      www.shareddocs.com/4.php  (htdocs)
      www.shareddocs.com/5.php  (webroot)
      www.shareddocs.com/6.php  (webroot)
      www.shareddocs.com/7.php  (webroot)
      www.shareddocs.com/8.php  (webroot)

Is this safe and wise? I am not trying to run a virtual host but am
curious if this is at all possible? I am a single user (not a web
host) and if this is possible may some one please help me out a bit :)

I've tried alias and looked at aliamatch but I am not at all fair with
regex and the such. Also, I thought maybe looking into the virtual
host might help but I am not trying to host others... What is the
single user solution for this?

Thank you for your time on reading this. I thank you again.

-- 
Best regards,
 Victor B. Gonzalez                          

apache_2.0.46-win32-x86-no_src
Windows XP 5.1 Build 2600 Service Pack 1


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to make two directories share one url?

Posted by Mike Klein <mi...@sbcglobal.net>.
Victor B. Gonzalez wrote:

>Hello Apache Users,
>
>I would like to make one directory on my machine share the htdocs
>directory... In other words I do not wish to put some content directly
>into the htdocs directory but would like that content to be accessible
>through the htdocs directory.
>
>I.e. htdocs currently has four files in it. Another directory called
>webroot has four files in it. It would be nice if a person can reach
>all files through one path...
>
>      www.shareddocs.com/1.php  (htdocs)
>      www.shareddocs.com/2.php  (htdocs)
>      www.shareddocs.com/3.php  (htdocs)
>      www.shareddocs.com/4.php  (htdocs)
>      www.shareddocs.com/5.php  (webroot)
>      www.shareddocs.com/6.php  (webroot)
>      www.shareddocs.com/7.php  (webroot)
>      www.shareddocs.com/8.php  (webroot)
>
>Is this safe and wise? I am not trying to run a virtual host but am
>curious if this is at all possible? I am a single user (not a web
>host) and if this is possible may some one please help me out a bit :)
>
>I've tried alias and looked at aliamatch but I am not at all fair with
>regex and the such. Also, I thought maybe looking into the virtual
>host might help but I am not trying to host others... What is the
>single user solution for this?
>
>Thank you for your time on reading this. I thank you again.
>
>  
>
I'm not sure if this makes a lot of sense. Two urls mapped to same 
directory...sure. But the other way around?

A symlink won't give you this behaviour either.

A directory is a unit of modularity...you put things that belong 
together (usually!) into a single directory. This is how Java code 
packages are created, etc. Mung'ing/Cat'g two directories into a single 
one (via url) breaks this paradigm and isn't even possible that I'm 
aware of.

What would you do about file collisions? A directory is a scope for 
filenames.

Now...if it's just getting all your ducks in a row that you want...try a 
few different things.

Note: Your webroot isn't probably where you want to place these things 
anyways...create a docs directory under your web/doc root or something.

You could create an 'uber' docs directory and then provide symlinks 
underneath it to different doc directories (htdocs, mydocs, etc.).


mike


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re[2]: [users@httpd] How to make two directories share one url?

Posted by "Victor B. Gonzalez" <ap...@vbgunz.com>.
Hello Apache Users,

Thank you to all who took the time to answer the question. I
appreciate the diverse and yet unified message of this perhaps being a
little harder than its worth. Your time and knowledge is priceless!

Thanks again :)

-- 
Best regards,
 Victor B. Gonzalez                          

apache_2.0.46-win32-x86-no_src
Windows XP 5.1 Build 2600 Service Pack 1


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to make two directories share one url?

Posted by Jeff White <jl...@earthlink.net>.
From: "Jonas Eckerman"

On Mon, 6 Oct 2003 20:26:34 -0300, Cody Harris wrote:

> > If you were using Linux,
> > you could use sym links. But i don't know
> > how that would work for Windows.

> > NTFS supports something similar do hard links and symlinks,

For general information:

Best Performance: Windows 2000 Professional
http://www.microsoft.com/technet/prodtechnol/windows2000pro/evaluate/featfunc/bestperf.asp

Jeff




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to make two directories share one url?

Posted by Jonas Eckerman <jo...@frukt.org>.
On Mon, 6 Oct 2003 20:26:34 -0300, Cody Harris wrote:

> If you were using Linux, you could use sym links. But i don't know
> how that would work for Windows.

NTFS supports something similar do hard links and symlinks, though 
they are called something else (of course), so in WinNT/2K/XP you 
should be able to do the same thing.

Of course, Microsoft neglected to include i utility for creating 
links (except for the drive manager, wich creates links from drive 
letters or directories to devices), but I pretty sure such utilities 
can be found on the web somewhere.

Regards
/Jonas
-- 
Jonas Eckerman, jonas_lists@frukt.org
http://www.fsdb.org/



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to make two directories share one url?

Posted by Cody Harris <hc...@ns.sympatico.ca>.
On Mon, 6 Oct 2003 18:55:38 -0400,
Someone named "Victor B. Gonzalez" <ap...@vbgunz.com> wrote:

> Hello Apache Users,
> 
> I would like to make one directory on my machine share the htdocs
> directory... In other words I do not wish to put some content directly
> into the htdocs directory but would like that content to be accessible
> through the htdocs directory.
> 
> I.e. htdocs currently has four files in it. Another directory called
> webroot has four files in it. It would be nice if a person can reach
> all files through one path...
> 
>       www.shareddocs.com/1.php  (htdocs)
>       www.shareddocs.com/2.php  (htdocs)
>       www.shareddocs.com/3.php  (htdocs)
>       www.shareddocs.com/4.php  (htdocs)
>       www.shareddocs.com/5.php  (webroot)
>       www.shareddocs.com/6.php  (webroot)
>       www.shareddocs.com/7.php  (webroot)
>       www.shareddocs.com/8.php  (webroot)
> 
> Is this safe and wise? I am not trying to run a virtual host but am
> curious if this is at all possible? I am a single user (not a web
> host) and if this is possible may some one please help me out a bit :)
> 
> I've tried alias and looked at aliamatch but I am not at all fair with
> regex and the such. Also, I thought maybe looking into the virtual
> host might help but I am not trying to host others... What is the
> single user solution for this?
> 
> Thank you for your time on reading this. I thank you again.
> 
> -- 
> Best regards,
>  Victor B. Gonzalez                          
> 
> apache_2.0.46-win32-x86-no_src
> Windows XP 5.1 Build 2600 Service Pack 1

If you were using Linux, you could use sym links. But i don't know how that would work for Windows. Maybe a rewrite? The guys will tell you more in depth.

> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 


-- 
+------------------+-----------------------------+
| Cody Harris      | Signed with GnuPG signature |
| KeyID: 610031E2A | vectec.net/~cody/key.asc    |
+------------------------------------------------+