You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Christian Huegel <ch...@stonebyte.de> on 2005/09/30 12:27:30 UTC

Rewrite index.html whith multiple languages

Hello,


i´ve set up Lenya 1.2.4 with cocoon-2.1.7 and everything works fine, even with
those rewrite rules (See my configuration below, it might be usefull for enyone)
But when i want to publish a non english index.html (e.g. index_de.html) the
rule (RewriteRule ^/$ index.html [R]) still rewrites everything to index.html
and this is the english page. Sure i can say RewriteRule ^/$ index_de.html [R]
but how is this handled if somebody requests the english page?
I hope you understand my point of view.
Best regards,

Christian 


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


Re: Image upload problem

Posted by Jann Forrer <ja...@id.unizh.ch>.
On Wed, 5 Oct 2005, Lee Carroll wrote:

> I've a re-occuring problem which I can't get to the bottom of.
>
> After a week or so of content maint activity  my editors loose the ability to 
> upload images
>
> the error is pasted below
>
> It looks like its a cache issue as re-starting lenya solves the problem
>
> Has anyone saw / solved this issue as its causing support headache
>
> running lenya 1.2.3 within jetty and using cocoon 2.1.7
>
> All of this sits behind apache which reverse proxies to pubs as requested
>

We have quite a similiar setup and we did observe this behaviour too. As a 
workaround we decide to restart tomcat every night which probably is not 
the best solution but since then the problem is does not appear anymore.
But of course we could not really solve the problem yet.

Jann


---------------------------------------------------------------
Jann Forrer
Informatikdienste
Universität Zürich
Winterthurerstr. 190
CH-8057 Zuerich

oooO   mail:  jann.forrer@id.unizh.ch
(  )   phone: +41 44 63 56772
  \ (   fax:   +41 44 63 54505
   \_)  http://www.id.unizh.ch

Image upload problem

Posted by Lee Carroll <le...@aol.com>.
I've a re-occuring problem which I can't get to the bottom of.

After a week or so of content maint activity  my editors loose the ability 
to upload images

the error is pasted below

It looks like its a cache issue as re-starting lenya solves the problem

Has anyone saw / solved this issue as its causing support headache

running lenya 1.2.3 within jetty and using cocoon 2.1.7

All of this sits behind apache which reverse proxies to pubs as requested

Lee C

ps the error is correct no such file does exist (it's not been uploaded 
yet!!)


Problem in creating the Request
Message: null

Description: No details available.

Sender: org.apache.cocoon.servlet.CocoonServlet

Source: Cocoon Servlet

cause

Malformed stream: 
/tmp/Jetty__8888__/cocoon-files/upload-dir/siteStatsScreenShot.jpg (No such 
file or directory)
request-uri

/pear/info-authoring/globalAssetBin.html
Apache Cocoon 2.1.7


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


Re: Rewrite index.html whith multiple languages

Posted by Christian Huegel <ch...@stonebyte.de>.
Jann Forrer <jann.forrer <at> id.unizh.ch> writes:

> 
> Strage the above rule works for me. That means if i put e.g. German (de)
> as my prefered language in the browser language settings I get
> index_de.html.
> 
> What does the RewriteLog say. If you set the level to 9 you will get quite
> a lot of information 
> 
> Jann
> 


Hi Jann,

yes i tried this one more time and it did work. My browsers language was en_us
*doh* 
Thank you.


Regards,

Christian


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


Re: Rewrite index.html whith multiple languages

Posted by Jann Forrer <ja...@id.unizh.ch>.
On Fri, 30 Sep 2005, Christian Huegel wrote:

> Jann Forrer <jann.forrer <at> id.unizh.ch> writes:
>
> >
> > On Fri, 30 Sep 2005 solprovider <at> gmail.com wrote:
> >
> > > Deciding the Initial Language in Lenya:
> > > http://solprovider.com/lenya/languageinitial
> > >
> > > Someone else may answer how Apache httpd can Rewrite based on the
> > > visitor's browser's language choice (assuming it is possible), but the
> > > hack on that page works without the Rewrite module so it works with
> > > Jetty and other web servers.
> > >
> >
> > It ist possible by using the HTTP-Header Accectp Language as follows:
> >
> > RewriteCond %{HTTP:Accept-Language} ^de [NC]
> > RewriteRule ^/$ index_de.html [R]
> >
> > I did not test it but it should work like this
> >
> > Jann
> >
>
>
> Hi and thanks for your reply.
> No, it doesn´t work, the URL is still rewritten to index.html
> Here ist my configuration:
>

Strage the above rule works for me. That means if i put e.g. German (de)
as my prefered language in the browser language settings I get
index_de.html.

> <VirtualHost www.example:80>
>      ServerName www.example.com
>      ServerAlias www
>      ProxyRequests Off
>      RewriteEngine On
>      RewriteLog logs/www.example.com.rewrite.log
>      RewriteLogLevel 0
>    # Rewrite fuer ROOT
>    # RewriteRule ^/$ index_de.html [R]
>      RewriteCond %{HTTP:Accept-Language} ^de [NC]
>      RewriteRule ^/$ index_de.html [R]
>      RewriteRule ^/default/live/(.*)$ $1 [R,L]
>      RewriteRule ^/(.*) http://www.example.com:8080/default/live/$1 [P]
>      ProxyPassReverse / http://www.example.com:8080/
> </VirtualHost>
>
What does the RewriteLog say. If you set the level to 9 you will get quite
a lot of information ;-)

Jann

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


Re: Rewrite index.html whith multiple languages

Posted by Christian Huegel <ch...@stonebyte.de>.
Jann Forrer <jann.forrer <at> id.unizh.ch> writes:

> 
> On Fri, 30 Sep 2005 solprovider <at> gmail.com wrote:
> 
> > Deciding the Initial Language in Lenya:
> > http://solprovider.com/lenya/languageinitial
> >
> > Someone else may answer how Apache httpd can Rewrite based on the
> > visitor's browser's language choice (assuming it is possible), but the
> > hack on that page works without the Rewrite module so it works with
> > Jetty and other web servers.
> >
> 
> It ist possible by using the HTTP-Header Accectp Language as follows:
> 
> RewriteCond %{HTTP:Accept-Language} ^de [NC]
> RewriteRule ^/$ index_de.html [R]
> 
> I did not test it but it should work like this
> 
> Jann
> 


Hi and thanks for your reply.
No, it doesn´t work, the URL is still rewritten to index.html
Here ist my configuration:

<VirtualHost www.example:80>
     ServerName www.example.com
     ServerAlias www
     ProxyRequests Off
     RewriteEngine On
     RewriteLog logs/www.example.com.rewrite.log
     RewriteLogLevel 0
   # Rewrite fuer ROOT
   # RewriteRule ^/$ index_de.html [R]
     RewriteCond %{HTTP:Accept-Language} ^de [NC]
     RewriteRule ^/$ index_de.html [R]
     RewriteRule ^/default/live/(.*)$ $1 [R,L]
     RewriteRule ^/(.*) http://www.example.com:8080/default/live/$1 [P]
     ProxyPassReverse / http://www.example.com:8080/
</VirtualHost>


Christian


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


Re: Rewrite index.html whith multiple languages

Posted by Jann Forrer <ja...@id.unizh.ch>.
On Fri, 30 Sep 2005 solprovider@gmail.com wrote:

> Deciding the Initial Language in Lenya:
> http://solprovider.com/lenya/languageinitial
>
> Someone else may answer how Apache httpd can Rewrite based on the
> visitor's browser's language choice (assuming it is possible), but the
> hack on that page works without the Rewrite module so it works with
> Jetty and other web servers.
>

It ist possible by using the HTTP-Header Accectp Language as follows:

RewriteCond %{HTTP:Accept-Language} ^de [NC]
RewriteRule ^/$ index_de.html [R]

I did not test it but it should work like this

Jann

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


Re: Rewrite index.html whith multiple languages

Posted by so...@gmail.com.
Deciding the Initial Language in Lenya:
http://solprovider.com/lenya/languageinitial

Someone else may answer how Apache httpd can Rewrite based on the
visitor's browser's language choice (assuming it is possible), but the
hack on that page works without the Rewrite module so it works with
Jetty and other web servers.

solprovider

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


Re: Rewrite index.html whith multiple languages

Posted by Christian Huegel <ch...@stonebyte.de>.
Sorry, i´ve forgot the configuration:

!<VirtualHost lenya.example.com:80>
 ServerName lenya.example.com
 ServerAlias lenya
 ProxyRequests Off
 RewriteEngine On
 RewriteLog logs/lenya.example.com.rewrite.log
 RewriteLogLevel 9
 RewriteRule ^/([^/\.]+)$ $1/ [R]
 RewriteRule ^/([^/\.]+)/$
http://lenya.habenix.com/$1/authoring/index.html [R,L]
 RewriteCond %{QUERY_STRING} lenya\.usecase=login(.*)
 RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L]
 RewriteRule ^/(.*) http://lenya.example.com:8080/$1 [P,L]
 ProxyPassReverse / http://lenya.example.com:8080/
!</VirtualHost>



!<VirtualHost www.example.com:80>
 ServerName www.example.com
 ServerAlias www
 ProxyRequests Off
 RewriteEngine On
 RewriteLog logs/www.example.com.rewrite.log
 RewriteLogLevel 9
 # Rewrite fuer ROOT
 RewriteRule ^/$ index.html [R]
 RewriteRule ^/default/live/(.*)$ $1 [R,L]
 RewriteRule ^/(.*) http://www.example.com:8080/default/live/$1 [P]
 ProxyPassReverse / http://www.example.com:8080/

!</VirtualHost>

#########SSL PART##############
!<VirtualHosts *:443>
.
.
.
.

 ServerName lenya.example.com
 ProxyRequests Off
 RewriteEngine On
 RewriteLog logs/ssl.www.example.com.rewrite.log
 RewriteLogLevel 0
 RewriteRule ^/([^/\.]+)$ $1/ [R]
 RewriteRule ^/([^/\.]+)/$ 
http://www.example.com/$1/authoring/index.html [R,L]
 RewriteRule ^/(.*) http://www.example.com:8080/$1 [P,L]
 RewriteRule ^/(.*) http://%{SERVER_NAME}:8080/$1 [P,L]
 ProxyPassReverse / http://www.example.com:8080/
!</VirtualHost>

#############publication.xml###############
.
.
.
!<proxy url="https://www.example.com/default" 
ssl="true" area="live"/>
<proxy url="http://www.example.com/default" 
ssl="false" area="live"/>
<proxy url="https://lenya.example.com/default" 
ssl="true" area="authoring"/>
<proxy url="http://lenya.example.com/default" 
ssl="false" area="authoring"/>

###########################################


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