httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Ferrigan" <peter.ferri...@mci.com>
Subject RE: [users@httpd] Mod_rewrite help
Date Thu, 17 Apr 2003 21:49:27 GMT
Would I put this in the general server config or put it in each virtual
server config.

Thanks for the help guys.



-----Original Message-----
From: Jurgen [mailto:apache@squarehosting.com] 
Sent: Thursday, April 17, 2003 4:48 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Mod_rewrite help


Ok I should have read the whole email.

something like this should work, but I didn't test it.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^([^.]\.)?olddomain\.com
RewriteRule (.*) http://%1newdomain.com$1

You might need to consider case sensitivity with the %{HTTP_HOST}

Jurgen


On Thu, 17 Apr 2003 16:29:34 -0500
"Peter Ferrigan" <peter.ferrigan@mci.com> wrote:

> 
> Good evening, all.
> 
> I need some help with the mod_rewrite in Apache 1.3.27 (Solaris
> 9/Sparc).  I've been presented with a problem where my company changed
> it's domain name.  I need to force anything going to the old domain to
> the new one and I cannot do this with DNS (long story)
> 
> Pretty much like this:
> 
> Hostname.olddomain.com
> 
> Needs to go to
> 
> Hostname.newdomain.com
> 
> I've tried redirects, but that doesn't take into account any directory
> that the user may have typed in.  So, in an ideal world it would work
> like this:
> 
> Hostname.olddomain.com/whateveritype  will end up at
> hostname.newdomain.com/whateveritype
> 
> To add to this mess, I've also got Virtual hosts, but they all have
the> same domain name.  ie:
> 
> Host1.domain.com
> Host2.domain.com
> Etc..
> 
> They also need to point over to the new domain name, regardless of
what> resource the user is trying access
> 
> Can anyone lend me a hand with this?
> 
> Thanks in advance!
> 
> - Peter 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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

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



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


Mime
View raw message