Possible With Mod Rewrite

Hi guys,

Does anyone know if it is possible with mod rewrite to rewrite the document root directory to a a directory under it?

Like say:
www is document root
but I would like
www/public to be document root with mod rewrite.

If so can someone point me in the right directory and which modifier to use?

Thanks,
Darren

Ah thanks dklynn. I am going to use RewriteBase, this is on a server with cPanel and I do not want directives getting touched.

Darren,

The BEST way to do that is to change the pointer to the DocumentRoot in your vhosts configuration file. If you don’t have access to that, Alias is your best option (because it’s part of Apache’s core, it’ll work [I]FAST[/I]) or [URL=“http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritebase”]RewriteBase will do that for you (albeit, it’s one of my least favorite mod_rewrite directives).

Regards,

DK