httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <>
Subject Re: [users@httpd] Redirect
Date Wed, 12 Mar 2008 13:48:00 GMT
On Wed, Mar 12, 2008 at 7:36 AM, Srikanth NT <> wrote:
> Hi
> recently we moved our servers to a different place and so we want to
> redirect the pages hitting the previous server to the new server location.
> Also we need to workout to redirect site address wrongly typed. Say for
> example, instead of if user enters
> I want it to get redirected properly.

You might want to look at

> I tried writing a redirection.conf and include in httpd.conf before
> including virtualhosts.conf

In each of your virtual hosts you'll also need
RewriteEngine On
RewriteOptions inherit

> RewriteEngine on
> RewriteLog "/var/log/httpd/rewrite.log"

And what exactly do you get in the rewrite.log?

> RewriteCond     %{HTTP_HOST}
> ^(www\.){0,1}my(.)*website(.)*(\.)(com|co\.uk)$ [NC]

That regex is a little over-complicated. Don't group expressions with
() unless you really need to. You probably want something more like


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