You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by qMax <qm...@mediasoft.ru> on 2005/03/14 14:19:45 UTC

howto needed

At my site i want to make some obvious redirections:
 /authoring/**     -> /main/authoring/{1}
 /**               -> /main/live/{1}
Here 'foo' are some publications other then 'main'

I put following pipeline at end of global-sitemap.xmap:
    <map:pipeline>
      <map:match pattern="auth/**">
        <map:redirect-to uri="cocoon:/lenya-redirect/main/authoring/{1}"/>
      </map:match>
      <map:match pattern="**">
        <map:redirect-to uri="cocoon:/lenya-redirect/main/live/{1}"/>
      </map:match>
    </map:pipeline>

And replaced all matching patterns="*" with pattern="lenya-redirect/*",
and also uri-prefixes  for all mounts in this matches.

However, language-exist act (in publication-sitemap.xmap)
fails to get publication-id throug page-envelope input module:
org.apache.lenya.cms.publication.PageEnvelopeException: org.apache.lenya.cms.publication.PublicationException: The publication for ID [lenya-redirect] could not be created.
        at org.apache.lenya.cms.publication.PageEnvelope.<init>(PageEnvelope.java:125)
        at org.apache.lenya.cms.publication.PageEnvelope.<init>(PageEnvelope.java:157)
        at org.apache.lenya.cms.publication.PageEnvelopeFactory.getPageEnvelope(PageEnvelopeFactory.java:62)
        at org.apache.lenya.cms.cocoon.acting.LanguageExistsAction.act(LanguageExistsAction.java:72)

I could not force PageEnvelope to print any debug.
but it seels like "lenya-redirect/*" is passed to publication-sitemap.xmap

How should i make those redirects correctly ?

-- 
 qMax


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


Re: howto needed

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Ken Gunderson wrote:

> Along these lines, I have been trying to simply access the live part of
> my publication via http://www.my.dom/  in wh/case shouldn't I just have
> something like this in publication.xconf?
> 
> <proxy url="http://www.my.dom" ssl="false" area="live"/>
> 
> I'm pretty sure my rewrite rules are correct.  I can get to the default
> page, but then none of the links work from there.  
> 
> This is with Jetty wh/is already root context, so I don't think it's a
> cookie issue?  Regardless, I did patch apache.

can you provide exerpts of your rewrite config? note that link rewriting 
will only work for links that are in the canonical form (as discussed in 
  http://issues.apache.org/bugzilla/show_bug.cgi?id=31157 
http://issues.apache.org/bugzilla/show_bug.cgi?id=33514 )

the navigation links are relative and should always work.

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


Re: howto needed

Posted by Ken Gunderson <kg...@teamcool.net>.
On Tue, 15 Mar 2005 16:30:59 -0500
"Gregor J. Rothfuss" <gr...@apache.org> wrote:

> qMax wrote:
> > Monday, March 14, 2005, 7:19:45 PM, qmax@mediasoft.ru wrote:
> > q> At my site i want to make some obvious redirections:
> > q>  /authoring/**     -> /main/authoring/{1}
> > q>  /**               -> /main/live/{1}
> > 
> > What i want is to access live area of main publication with url:
> > http://host/ instead of http://host/lenya/main/live/
> > and authoring area with url http://lamed/authoring/ instead of
> > http://host/lenya/main/live/authoring/
> > 
> > Is it possible w/out proxying using Apache httpd with mod_rewrite ?
> 
> not without a lot of work. save yourself the effort and set up httpd 
> with mod_proxy

Along these lines, I have been trying to simply access the live part of
my publication via http://www.my.dom/  in wh/case shouldn't I just have
something like this in publication.xconf?

<proxy url="http://www.my.dom" ssl="false" area="live"/>

I'm pretty sure my rewrite rules are correct.  I can get to the default
page, but then none of the links work from there.  

This is with Jetty wh/is already root context, so I don't think it's a
cookie issue?  Regardless, I did patch apache.

TIA-

-- 
Best regards,

Ken Gunderson
GPG Key-- 9F5179FD

"Freedom begins between the ears."	-- Edward Abbey


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


Re: howto needed

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
qMax wrote:
> Monday, March 14, 2005, 7:19:45 PM, qmax@mediasoft.ru wrote:
> q> At my site i want to make some obvious redirections:
> q>  /authoring/**     -> /main/authoring/{1}
> q>  /**               -> /main/live/{1}
> 
> What i want is to access live area of main publication with url:
> http://host/ instead of http://host/lenya/main/live/
> and authoring area with url http://lamed/authoring/ instead of
> http://host/lenya/main/live/authoring/
> 
> Is it possible w/out proxying using Apache httpd with mod_rewrite ?

not without a lot of work. save yourself the effort and set up httpd 
with mod_proxy

> I have only tomcat installed and there's no (and no general need of) httpd.
> This is internanet site and i see no need of proxying here.
> 


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


Re: howto needed

Posted by qMax <qm...@mediasoft.ru>.
Monday, March 14, 2005, 7:19:45 PM, qmax@mediasoft.ru wrote:
q> At my site i want to make some obvious redirections:
q>  /authoring/**     -> /main/authoring/{1}
q>  /**               -> /main/live/{1}

What i want is to access live area of main publication with url:
http://host/ instead of http://host/lenya/main/live/
and authoring area with url http://lamed/authoring/ instead of
http://host/lenya/main/live/authoring/

Is it possible w/out proxying using Apache httpd with mod_rewrite ?

I have only tomcat installed and there's no (and no general need of) httpd.
This is internanet site and i see no need of proxying here.

-- 
 qMax


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