|
/
Zope
/
Apsis
/
Pound Mailing List
/
Archive
/
2006
/
2006-06
/
Redirect from www\.(.+) to \1
[
URL Rewriting Issues with Pound Version 2 and ... ]
[
pound 2.0.6 with external editor / Raphael Pesche ... ]
Redirect from www\.(.+) to \1
"Klaus Alexander Seistrup" <kseistrup(at)gmail.com> |
2006-06-17 07:40:32 |
[ SNIP ]
|
Øj,
I wonder … is there an easy way to redirect from "www\.(.+)" to "\1"?
I.e., to avoid the www in the hostname.
Cheers,
--
Klaus Alex Seistrup
Copenhagen · DK
http://surdej.dk/
|
|
|
Re: [Pound Mailing List] Redirect from www\.(.+) to \1
"Richard Hamilton" <ricky.hamilton(at)btopenworld.com> |
2006-06-17 13:13:54 |
[ SNIP ]
|
I may have understood your question but can you not simply use this:
ListenHTTP
Address 1.2.3.4
Port 80
Service
HeadRequire "Host: .*server0.com.*"
BackEnd
Address 192.168.0.10
Port 80
End
End
End
End
Regards
Richard
----- Original Message -----
From: "Klaus Alexander Seistrup" <kseistrup(at)gmail.com>
To: "Pound Users" <pound(at)apsis.ch>
Sent: Saturday, June 17, 2006 6:40 AM
Subject: [Pound Mailing List] Redirect from www\.(.+) to \1
Øj,
I wonder … is there an easy way to redirect from "www\.(.+)" to "\1"?
I.e., to avoid the www in the hostname.
Cheers,
--
Klaus Alex Seistrup
Copenhagen · DK
http://surdej.dk/
--
To unsubscribe send an email with subject 'unsubscribe' to pound(at)apsis.ch.
Please contact roseg(at)apsis.ch for questions.
http://www.apsis.ch/pound/pound_list/archive/2006/2006-06/1150522832000
|
|
|
Re: [Pound Mailing List] Redirect from www\.(.+) to \1
"Klaus Alexander Seistrup" <kseistrup(at)gmail.com> |
2006-06-17 14:45:52 |
[ SNIP ]
|
Richard Hamilton wrote:
> I may have understood your question but can you not simply use this:
>
> ListenHTTP
> Address 1.2.3.4
> Port 80
>
> Service
> HeadRequire "Host: .*server0.com.*"
>
> BackEnd
> Address 192.168.0.10
> Port 80
> End
> End
> End
> End
Well, yes, but that gives me a different result. I want to get rid of
the www altogether, so that when people type
http://www.example.com/some/page.html pound redirects them to
http://example.com/some/page.html (preferrably with a 301, but I guess
307 would do also).
Is it possible?
Cheers,
Klaus.
--
Klaus Alexander Seistrup
Copenhagen · Denmark
http://magnetic-ink.dk/
|
|
|
Re: [Pound Mailing List] Redirect from www\.(.+) to \1
Ted Dunning <tdunning(at)veoh.com> |
2006-06-17 20:19:47 |
[ SNIP ]
|
I think the original question had to do with host name rewriting (which
is not supported in pound).
Richard Hamilton wrote:
> I may have understood your question but can you not simply use this:
>
> ListenHTTP
> Address 1.2.3.4
> Port 80
>
> Service
> HeadRequire "Host: .*server0.com.*"
>
> BackEnd
> Address 192.168.0.10
> Port 80
> End
> End
> End
> End
>
>
> Regards
> Richard
>
>
> ----- Original Message ----- From: "Klaus Alexander Seistrup"
> <kseistrup(at)gmail.com>
> To: "Pound Users" <pound(at)apsis.ch>
> Sent: Saturday, June 17, 2006 6:40 AM
> Subject: [Pound Mailing List] Redirect from www\.(.+) to \1
>
>
> Øj,
>
> I wonder … is there an easy way to redirect from "www\.(.+)" to "\1"?
> I.e., to avoid the www in the hostname.
>
> Cheers,
>
--
Ted Dunning
Chief Scientist
Veoh Networks
|
|
|
Re: [Pound Mailing List] Redirect from www\.(.+) to \1
"Klaus Alexander Seistrup" <kseistrup(at)gmail.com> |
2006-06-18 09:36:59 |
[ SNIP ]
|
Ted Dunning wrote:
> I think the original question had to do with host name rewriting (which
> is not supported in pound).
I do not need host rewriting, just URL redirection.
I would like to be able to do something like this:
#v+
HeadRequire "Host: www.example.com"
URL "/(.*)"
Redirect "http://example.com/\1"
#v-
where "\1" expands to the match of "(.*)" in the URL statement.
Cheers,
--
Klaus Alexander Seistrup
Copenhagen · Denmark
http://surdej.dk/
|
|
|
Re: [Pound Mailing List] Redirect from www\.(.+) to \1
Russell Valentine <russ(at)altec.org> |
2006-06-18 10:14:54 |
[ SNIP ]
|
Klaus Alexander Seistrup said the following on 06/18/06 02:36:
> Ted Dunning wrote:
>
>> I think the original question had to do with host name rewriting (which
>> is not supported in pound).
>
> I do not need host rewriting, just URL redirection.
>
> I would like to be able to do something like this:
>
> #v+
>
> HeadRequire "Host: www.example.com"
> URL "/(.*)"
> Redirect "http://example.com/\1"
>
> #v-
>
> where "\1" expands to the match of "(.*)" in the URL statement.
>
Apache's mod_rewrite could do this for you. I don't know what web server
you are running, but it would be more of a job for your web server than
pound.
Russell Valentine
|
|
|
Re: [Pound Mailing List] Redirect from www\.(.+) to \1
"Klaus Alexander Seistrup" <kseistrup(at)gmail.com> |
2006-06-18 10:44:58 |
[ SNIP ]
|
Russell Valentine wrote:
>> I would like to be able to do something like this:
>>
>> #v+
>>
>> HeadRequire "Host: www.example.com"
>> URL "/(.*)"
>> Redirect "http://example.com/\1"
>>
>> #v-
>>
>> where "\1" expands to the match of "(.*)" in the URL statement.
>
> Apache's mod_rewrite could do this for you. I don't know what web
> server you are running, but it would be more of a job for your web
> server than pound.
I'm not sure why you think this is more a job for a web server. I'm
running a heterogenous crowd of backends (zope being one of them) but
apache is not included. I think pound is an obvious place to do the
redirection since pound can do at least some redirection, and since
pound is the main entry point.
Cheers,
--
Klaus Alexander Seistrup
Copenhagen · Denmark
http://surdej.dk/
|
|
|
Re: [Pound Mailing List] Redirect from www\.(.+) to \1
"Richard Hamilton" <ricky.hamilton(at)btopenworld.com> |
2006-06-18 12:34:15 |
[ SNIP ]
|
In OpenACS we use an Aolserver registered filter to do this job. However, if
reverse proxying I would need to set Pound up to route requests for both
http://www.example.com and http://example.com to the same backend.
So I guess the answer is that both the reverse proxy and the backend need to
know. Pound needs to know to route requests for both hosts to the same
backend, and the backend needs to know to respond to requests for both
hostnames.
I do not know if pound can rewrite the request for you, but I would have to
agree that I don't think that that is Pound's job.
Regards
Richard
----- Original Message -----
From: "Klaus Alexander Seistrup" <kseistrup(at)gmail.com>
To: "Pound Users" <pound(at)apsis.ch>
Sent: Sunday, June 18, 2006 9:44 AM
Subject: Re: [Pound Mailing List] Redirect from www\.(.+) to \1
Russell Valentine wrote:
>> I would like to be able to do something like this:
>>
>> #v+
>>
>> HeadRequire "Host: www.example.com"
>> URL "/(.*)"
>> Redirect "http://example.com/\1"
>>
>> #v-
>>
>> where "\1" expands to the match of "(.*)" in the URL statement.
>
> Apache's mod_rewrite could do this for you. I don't know what web
> server you are running, but it would be more of a job for your web
> server than pound.
I'm not sure why you think this is more a job for a web server. I'm
running a heterogenous crowd of backends (zope being one of them) but
apache is not included. I think pound is an obvious place to do the
redirection since pound can do at least some redirection, and since
pound is the main entry point.
Cheers,
--
Klaus Alexander Seistrup
Copenhagen · Denmark
http://surdej.dk/
--
To unsubscribe send an email with subject 'unsubscribe' to pound(at)apsis.ch.
Please contact roseg(at)apsis.ch for questions.
http://www.apsis.ch/pound/pound_list/archive/2006/2006-06/1150522832000/1150620298000
|
|
|
|