RE: [users@httpd] Only redirecting, but not changing the root?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx] 
Sent: Tuesday, December 13, 2005 9:26 AM
To: users@xxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux