You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Milan Reznicek <re...@gytool.cz> on 2003/10/18 16:00:36 UTC

[users@httpd] Rewrite question

Hi everybody,
    could you please help me to solve this problem. I'm a newbie to
rewriting the URLs and all I need is to rewrite all "*.myserver.com" request
to "xxx.myserver.com" .


                                                        Thanks in advance
Milan

----------------------------------
Milan Reznicek
Software Developer

e-mail:   reznicekm@gytool.cz



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


Re: [users@httpd] Rewrite question

Posted by Robert Andersson <ro...@profundis.nu>.
Milan Reznicek wrote:
>     could you please help me to solve this problem. I'm a newbie to
> rewriting the URLs and all I need is to rewrite all "*.myserver.com"
> request to "xxx.myserver.com".

Honouring KISS (Keep It Simple, Stupid!), just do:

<VirtualHost *>
    ServerName xxx.myserver.com
    ...
<VirtualHost>
<VirtualHost *>
    ServerName myserver.com
    ServerAlias *.myserver.com
    Redirect / http://xxx.myserver.com/
</VirtualHost>

Regards,
Robert Andersson

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