httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Huffstetler" <craig.huffstet...@gmail.com>
Subject Re: [users@httpd] domain.com/~user -> user.domain.com
Date Mon, 12 Nov 2007 20:54:52 GMT
According to the page referenced:
http://www.easymodrewrite.com/example-subdomains

*"This code should be placed in the htaccess file in the root of your
domain, i.e.* domain.com/.htaccess"

.....

On Nov 12, 2007 1:30 PM, Antonio Piu <antonio.piu@italocalvino.it> wrote:

> >> Want I want to do is the following:
> >>
> >> If someone accesses http://user.domain.com/ he shall be redirected to
> >> http://www.domain.com/~user/ <http://www.domain.com/%7Euser/>
> >
> > From http://www.easymodrewrite.com/example-subdomains without having
> > tested it, this should work:
> >
> >    RewriteEngine On
> >    RewriteBase /
> >    RewriteCond %{HTTP_HOST} !www.domain.com$ [NC]
> >    RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9-]+).domain.com$ [NC]
> >    RewriteRule (.*) ~%2/$1 [L]
> >
>
> Thanks! but where I have to put this code? In which .htaccess?
>
>
> >
> >
> > ---------------------------------------------------------------------
> > 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@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
>
>
> ---------------------------------------------------------------------
> 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@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Mime
View raw message