You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Marc Perkel <ma...@perkel.com> on 2005/11/07 03:37:48 UTC

[users@httpd] RedirectMatch Question

OK - how would I do this?

I'm migrating my mailman server to another computer and I'm changing the 
URL and I want to redirect from the old URL to the new one. The old 
server has many virtual domains and here what I want to do:

http://www.churchofreality.org/mailman/*  --->  
http://mailman.churchofreality.org/*

I'm confused about how to do this and figure that someone out there has 
this down.

Thanks in Advance

-- 
Marc Perkel - marc@perkel.com

Spam Filter: http://www.junkemailfilter.com
    My Blog: http://marc.perkel.com


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


Re: [users@httpd] RedirectMatch Question

Posted by Joshua Slive <js...@gmail.com>.
On 11/7/05, Marc Perkel <ma...@perkel.com> wrote:

>  What I really want to do is this:
>
>  http://www.(.*)/mailman/(.*) --> http://mailmam.$1/$2
>
>  What I want to do is preserve the host part after the www and substiture
> mailman for www and lose the mailman on the end. I should have been clearer.

RewriteEngine On
RewiteCond %{HTTP_HOST}  ^www\.(.*)$ [NC]
RewriteRule ^/mailman/$1 http://mailman.%1/$1 [R]

Joshua.

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


Re: [users@httpd] RedirectMatch Question

Posted by Marc Perkel <ma...@perkel.com>.

Joshua Slive wrote:

>On 11/6/05, Marc Perkel <ma...@perkel.com> wrote:
>  
>
>>OK - how would I do this?
>>
>>I'm migrating my mailman server to another computer and I'm changing the
>>URL and I want to redirect from the old URL to the new one. The old
>>server has many virtual domains and here what I want to do:
>>
>>http://www.churchofreality.org/mailman/*  --->
>>http://mailman.churchofreality.org/*
>>
>>I'm confused about how to do this and figure that someone out there has
>>this down.
>>    
>>
>
>Redirect permanent /mailman http://mailman.churchofreality.org
>
>Joshua.
>  
>

OK - thanks for your help, but I didn't explain this very well.

What I really want to do is this:

http://www.(.*)/mailman/(.*) --> http://mailmam.$1/$2

What I want to do is preserve the host part after the www and substiture 
mailman for www and lose the mailman on the end. I should have been clearer.

So - this would also work:

http://www.ctyme.com/mailman./* --> http://mailman.ctyme.com/*

Not sure what kind of redirect lets you change the host part too.




Re: [users@httpd] RedirectMatch Question

Posted by Joshua Slive <js...@gmail.com>.
On 11/6/05, Marc Perkel <ma...@perkel.com> wrote:
> OK - how would I do this?
>
> I'm migrating my mailman server to another computer and I'm changing the
> URL and I want to redirect from the old URL to the new one. The old
> server has many virtual domains and here what I want to do:
>
> http://www.churchofreality.org/mailman/*  --->
> http://mailman.churchofreality.org/*
>
> I'm confused about how to do this and figure that someone out there has
> this down.

Redirect permanent /mailman http://mailman.churchofreality.org

Joshua.

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