httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Schoenborn <>
Subject RE: [users@httpd] URL re-writing problem
Date Tue, 22 Dec 2009 14:51:07 GMT
If you have a small number of subdomains, I would try, for each one:

<virtualhost *:80>
    ProxyRequests off
    ProxyPass         /
    ProxyPassReverse  /

Otherwise I would try a rewrite rule such as:

RewriteCond %(HTTP_HOST) (.+)
RewriteRule ^(.+)$ %(HTTP_HOST)$1    [C]
RewriteRule (.+)*)$1$2     [L]

The first rule is required so that pattern matching can extract the subdomain name. The condition
can be removed if the rewrite rules appear in a vhost. 


From: vijay shanker [] 
Sent: December 22, 2009 4:49 AM
Subject: [users@httpd] URL re-writing problem

Hi all,

I am very new to httpd server. And i have a immediate problem to solve. My server instance
is running on centos box.

If a request comes to my server as


This should be translated to 


I have configured many virtual host on my server. But this is quite a case and i am running
out of ideas 

Any suggestion: what should i do?

Vijay Shanker Dubey

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