Link to home
Start Free TrialLog in
Avatar of Jorge Fraser
Jorge FraserFlag for United States of America

asked on

mod_rewrite rule on HTTP_HOST

We are trying to capture any request that comes into our Apache server with a specific word in the domain and re-direct it to a specific page.

We currently have the following:

RewriteCond %{HTTP_HOST}   ^(.*)\.hydrochroma\.(.*)$ [NC]
RewriteRule ^/(.*)         http://dev.cp.com [R=301,L]

Basically we want anything with hydrochroma to be re-directed. The above rule traps everything and re-directs.

Any feedback will begreatly appreciated.
ASKER CERTIFIED SOLUTION
Avatar of Steve Bink
Steve Bink
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial