Define a subfolder as the document root

Hi guys,

I currently have a site set up like so:

Main doc root (Portal page - index.php)
-> Directory 1 (mini site)
-> Directoy 2 (2nd mini site)

Now, I am wanting make each directory it’s own document root with .htaccess so that i can define it’s own rewrite rules etc …

Is this possible?
I have been using the following:

DocumentRoot /Users/ico_ftp/webroot/portalroot/directory_1

But it does’nt seem to be making a difference.

Is this the correct syntax (directive?) to be using?

Cheers,
Dave

To make a sub folder or any folder a document root you have to use virtual host.

http://johnbokma.com/windows/apache-virtual-hosts-xp.html
http://apptools.com/phptools/virtualhost.php

ah ha … thank you very much

D

So is it not possible to change the DocumentRoot from an htaccess? like above?

DocumentRoot /some/directory

I have to use virtual hosts instead?

-thanks

Fleeters,

DocumentRoot is DEFINED by the VirtualHost section in httpd.conf, NOT in .htaccess. It is a basic Apache configuration item which cannot be altered outside httpd.conf.

Regards,

DK