httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Axel-St├ęphane SMORGRAV <Axel-Stephane.SMORG...@europe.adp.com>
Subject RE: [users@httpd] Only redirecting, but not changing the root?
Date Tue, 13 Dec 2005 09:33:57 GMT
Lennart,

I believe it would be very hard to achieve what you describe. Maybe that's why nobody replied.

The thing is that you could create different virtual hosts for example[1-n] all using the
same document root, but you would need to rewrite the path to prepend it with /example[i]
only for resources located in /public_html/example[i] and not for resources that are common
to all. 

<VirtualHost www.example1.com>
...
DocumentRoot /public_html
...
RewriteEngine On
RewriteCond "condition that excludes common resources"
RewriteCond $1 !^/example1
RewriteRule (.*) /example1$1
...
</VirtualHost>

An alternative method would be to use symbolic links for accessing the common resources. Each
VH has it's own document root /public_html/example[i: i=1..n], and you use a symbolic link
within the document root to point to where the common resources are located. This would require
the directory option FollowSymLinks.

These are the only two solutions I can think of...

Beste hilsener
-ascs


-----Original Message-----
From: Lennart Aangeenbrug [mailto:lennart@aangeenbrug.org] 
Sent: Tuesday, December 13, 2005 9:26 AM
To: users@httpd.apache.org
Subject: [users@httpd] Only redirecting, but not changing the root?

Hi all,

Yesterday i've posted a question and no one replyed :-( Maybe i explained it not clear enough
or is it not solvable. Here is my question again in another words:

How can I forward an user to a specific location, > without < changing the root? For
example:
www.example1.com == goes to ==> public_html/example1/, the root stays public_html/ www.example2.com
== goes to ==> public_html/example2/, the root stays public_html/ www.example3.com == goes
to ==> public_html/example3/, the root stays public_html/

The root public_html contains nothing more than a .htaccess file. It should recognize which
domain is adressed and then send it to the right dir. Why I want this? I keep in the dir 
public_html/ several other dirs, like graphic & tools I need for all sites.

gr, Lennart

---------------------------------------------------------------------
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


---------------------------------------------------------------------
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


Mime
View raw message