Re: Alias for htaccess

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

 



On Mon, Dec 21, 2009 at 7:12 AM, Jaap A. Haitsma <jaap@xxxxxxxxxxx> 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 www.maindomain.com) is in the directory
> /public_html
> and my add on domain can then be in
> /public_html/www.addondomain.com
>
> What I want is that my main domain is in
> /public_html/www.maindomain.com

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

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

-- 
Eric Covener
covener@xxxxxxxxx

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