You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Camilla Borg <ca...@email.de> on 2005/04/22 14:06:06 UTC

Apache rewrite rule

Hello,

I know this is a little bit off-topic, but in the Wiki there is a short tutorial on how to configure mod_proxy and mod_rewrite to work with lenya. I followed these instructions and they work except for the rewrite rule. I need a rewrite rule to remove the /default/live/ part from the URL. I cannot make this work. Here is what is within my httpd.conf:

I have just crossed out the server names:

<VirtualHost ****************************>
    RewriteEngine On
    ServerAdmin ********************
    ServerName ******************************

    ErrorLog logs/dummy-host.example.com-error_log
    CustomLog logs/dummy-host.example.com-access_log common
    ProxyPass / http://localhost:8888/default/live/
    ProxyPassReverse / http://localhost:8888/default/live/
    RewriteLog "./logs/rewrite.log" 
    RewriteLogLevel 2
    RewriteRule ^/default/live(.*)$ $1 [L]
</VirtualHost>

Have any idea what I am missing there?

Thanks,

Camilla


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Apache rewrite rule

Posted by Sascha Hunold <sa...@gmx.de>.
Camilla Borg wrote:

>I know this is a little bit off-topic, but in the Wiki there is a short tutorial on how to configure mod_proxy and mod_rewrite to work with lenya. I followed these instructions and they work except for the rewrite rule. I need a rewrite rule to remove the /default/live/ part from the URL. I cannot make this work. Here is what is within my httpd.conf:
>
><VirtualHost ****************************>
>    RewriteEngine On
>    ServerAdmin ********************
>    ServerName ******************************
>
>    ErrorLog logs/dummy-host.example.com-error_log
>    CustomLog logs/dummy-host.example.com-access_log common
>    ProxyPass / http://localhost:8888/default/live/
>    ProxyPassReverse / http://localhost:8888/default/live/
>    RewriteLog "./logs/rewrite.log" 
>    RewriteLogLevel 2
>    RewriteRule ^/default/live(.*)$ $1 [L]
></VirtualHost>
>
Since I cannot really test this I just give it a shot:

<VirtualHost ****************************>
    RewriteEngine On
    ServerAdmin ********************
    ServerName ******************************

    ErrorLog logs/dummy-host.example.com-error_log
    CustomLog logs/dummy-host.example.com-access_log common
    ProxyPassReverse / http://localhost:8888/
    RewriteLog "./logs/rewrite.log" 
    RewriteLogLevel 2
    RewriteRule ^/(.*) http://localhost:8888/lenya/default/live/$1 [P]
</VirtualHost>


Sascha

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org