|
Home > Archive > Apache Server configuration support > January 2007 > Mod_rewrite: Rewrite all subdomains, but not www
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Mod_rewrite: Rewrite all subdomains, but not www
|
|
|
|
| Davide Bianchi 2007-01-06, 8:11 pm |
| On 2007-01-04, w.breuer@gmail.com <w.breuer@gmail.com> wrote:
> For a high-loaded website I want to put some things from what was
> previously PHP-coded into the .htaccess file.
>
> This is the scenario:
>
> anybody visiting:
> http://domainname.ext/
> or http://something.domainame.ext/
This can be done by using the ServerAlias directive and ServerName
to 'catch' both and return always the correct servername.
> should be redirected to
> http://www.domainname.ext/directory...whateverhetyped
For this you only need one rewrite rule.
Davide
--
Yo-yo operating system = WinNT: it goes up..., it goes down..., it goes...
-- From a Slashdot.org post
| |
| w.breuer@gmail.com 2007-01-08, 7:26 pm |
| What would it look like then?
Davide Bianchi schreef:
> On 2007-01-04, w.breuer@gmail.com <w.breuer@gmail.com> wrote:
>
> This can be done by using the ServerAlias directive and ServerName
> to 'catch' both and return always the correct servername.
>
>
> For this you only need one rewrite rule.
>
> Davide
>
> --
> Yo-yo operating system = WinNT: it goes up..., it goes down..., it goes...
> -- From a Slashdot.org post
| |
| w.breuer@gmail.com 2007-01-08, 7:26 pm |
| Note; i can only work in .htaccess.. not in the httpd.conf!
Davide Bianchi schreef:
> On 2007-01-04, w.breuer@gmail.com <w.breuer@gmail.com> wrote:
>
> This can be done by using the ServerAlias directive and ServerName
> to 'catch' both and return always the correct servername.
>
>
> For this you only need one rewrite rule.
>
> Davide
>
> --
> Yo-yo operating system = WinNT: it goes up..., it goes down..., it goes...
> -- From a Slashdot.org post
|
|
|
|
|