httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <>
Subject Re: [users@httpd] Alias for htaccess
Date Mon, 21 Dec 2009 14:20:41 GMT
On Mon, Dec 21, 2009 at 7:12 AM, Jaap A. Haitsma <> wrote:
> Hi,
> I know you cannot use the Alias directive in htaccess but I was
> wondering if I can achieve something similar to that.
> I have the following problem. With my hosting provider I can add more
> domains to my main domain with which I registered. However they have
> to be in subdirectories
> To be more precise, my main domain (e.g is in the directory
> /public_html
> and my add on domain can then be in
> /public_html/
> What I want is that my main domain is in
> /public_html/

for .htaccess in your document root this will probably give you a good start:

RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^(www\.)$
RewriteRule (.*)  /public_html/$1

Eric Covener

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message