httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Cicimov <icici...@gmail.com>
Subject Re: [users@httpd] A rewrite rule
Date Fri, 25 Nov 2011 12:06:26 GMT
Is this working?


RewriteCond %{HTTP_HOST} \.tc\.example\.com$
RewriteRule ^/(.*)$ http://example.com/good/tc/$1 [R,L]

or you just want anything to go to /good/tc ?


RewriteCond %{HTTP_HOST} \.tc\.example\.com$
RewriteRule ^/.* http://example.com/good/tc [R,L]



On Fri, Nov 25, 2011 at 10:46 PM, Dennis <arsenepark@yahoo.com.cn> wrote:

> Hi, guys,
>
> I want to rewrite from "tc.example.com/xyz" to "example.com/good/tc"
>
> I tried the following rewrite rule, but it doesnot work.
>
> RewriteCond %{HTTP_HOST} \.tc\.example\.com$
> RewriteRule ^/(.*) /good/$1 [NC,P,L]
>
> Any idea how to do it?
>
> Thanks.
> Dennis
>

Mime
View raw message