"Joachim Ring" <jring.DeleteThis@web.de> schrieb im Newsbeitrag
news:3ae246c1.0410011616.7143c0f1@posting.google.com...
> "Andreas Hammerschmidt" <Andreas.Hammerschmidt.DeleteThis@gmx.net> wrote in message
> news:<415c87c6$1@e-post.inode.at>...
>> Hi!
>>
>> I am running two apache installations on port 80 (with php4) and 81 (with
>> php5).
>> [...]
>> Does anyone know why this isn't working and what can I do to get it
>> running?
>
> don't know, but let me get the swiss pocket knife:
>
> RewriteEngine On
> RewriteRule (.*\.php5)$ <a style='text-decoration: underline;' href="http://localhost:81/$1" target="_blank">http://localhost:81/$1</a> [P,L]
>
> Joachim
>
> PS: the docs are specifically talking abut a special case of using
> ProxyPass inside a <Location> header - maybe they meant just that...
It's working now. Many thanks to you!
I had to change it a bit to work correctly, because your version generates
"GET //index.php5 HTTP/1.1" instead of "GET /index.php5 HTTP/1.1". So you
have to remove the / before $1.
My finally working version:
RewriteEngine On
ProxyPreserveHost On
RewriteRule (.*\.php5)$ <a style='text-decoration: underline;' href="http://localhost:81$1" target="_blank">http://localhost:81$1</a> [P,L]
All .php5 requests are now forwarded to the port-81-apache and the original
Hostname is preserved, so links generated by the PHP script link back to the
port-80-apache.
thx,
Andreas<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: ProxyPass within LocationMatch not working