You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Phil Blake <ph...@tcp.net.au> on 2001/12/12 04:59:03 UTC

FAQ - How do I hide "cocoon" in the URL

I wish to "hide" part of the URL from the user.

I noticed on the cocoon web site there is a FAQ with the title:  How do 
i hide "cocoon" in the URL's once i integrate using mod_jk as shown 
above?

FYI: The example in the cocoon FAQ doesn't so much "hide" anything in 
the URL, rather presents the full URL immediately to the user - the 
complete opposite of the desired result.

I'll have a play with rewrite and aliases to see if there is a way to 
"hide" part of the URL (never used them before :) ) If someone has an 
answer to this, perhaps updating the FAQ would be good.

Thanks in advance,

Phil


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: FAQ - How do I hide "cocoon" in the URL

Posted by Simone Gianni <si...@discoone.com>.
At 14.05 12/12/2001 +0100, you wrote:
4) go to dm.dev.com to activate the web application and have the war file 
deploy. This should bring up the Cocoon welcome page in the ROOT of the site!
>Using this technique I have a sepparate directory and Cocoon configuration 
>for every site I run.  A major advantage to my oppinion.

This has been of great help (I was stuck in the same problem :)) ... but, 
as you said, the whole site will be served by cocoon. Now, what about 
images, downloads, zip files etc ?? ... everything that does not need to be 
parsed should be served directly by apache (also because cocoon adds a 
overhead). But making the whole site a webapp this does not happen. My 
actual solution is to have something like "images.mysite.com" as a virtual 
host mapped on the same directory, accepting .gif only, but it's just a bad 
artifact, since i always have to give complete urls for images.

Any solution for this ? Isn't it possible to have the web app receive only 
some extensions? or have apache catch *.gif before the web app, or 
something similar ?

Thanks

Simone





Re: FAQ - How do I hide "cocoon" in the URL

Posted by Phil Blake <ph...@tcp.net.au>.
Hi,

Thanks for your reply.

I'll try to clarify what I mean.

When the user enters "http://www.place.com/" into the browser the page 
that is returned is "http://www.place.com:8080/cocoon/mount/MyWebSite/".

This is very easy to achieve with a redirect but then the user will have 
the URL "http://www.place.com:8080/cocoon/mount/MyWebSite/" in their 
browser - this is NOT what I want. Also they will be using the tomcat 
http rather than apache - this is also not what I want.

So... :)

Step 1 - get mopd_webapp running... No Problems. Now I can go to 
"http://www.place.com/cocoon" and I get the same result as I would have 
with "http://www.place.com:8080/cocoon".

So far so good. But I don't just want to get to cocoon, I want to get to 
a sub-site mounted in the 'mount' directory.

Now I want to be able to enter the URL "http://www.place.com/index.html" 
and get back the same result as 
"http://www.place.com:8080/cocoon/mount/MyWebSite/index.html".

ie. within apache I need to rewrite ALL url's for a virtual host so that 
'/cocoon/mount/MyWebSite' is inserted at the beginning of all requests - 
BUT I don't want to user to see this so I can't use a redirect.

This is where I get stuck. :)

Thanks again,

Phil

On Wednesday, December 12, 2001, at 03:07 PM, David Rosenstrauch wrote:

> What they're referring to in the FAQ is that, by default, all URL's 
> contain "cocoon" in them, since usually cocoon resides in a "cocoon" 
> sub-dir under, say, Tomcat.  They provide directions how to take 
> "cocoon" out of the URL.
>
> I'm not sure what you're asking though.  What part of the URL are you 
> trying to hide?  You probably already know that the URL request 
> parameters (e.g., index.html?parm1=a&parm2=b) can be hidden by using 
> method=POST, so I assume you're not asking about this.
>
> If you can provide more details about what you're trying to hide, 
> perhaps I can help.
>
>
> DR
>
>
> At 02:59 PM 12/12/01 +1100, you wrote:
>> I wish to "hide" part of the URL from the user.
>>
>> I noticed on the cocoon web site there is a FAQ with the title:  How 
>> do i hide "cocoon" in the URL's once i integrate using mod_jk as shown 
>> above?
>>
>> FYI: The example in the cocoon FAQ doesn't so much "hide" anything in 
>> the URL, rather presents the full URL immediately to the user - the 
>> complete opposite of the desired result.
>>
>> I'll have a play with rewrite and aliases to see if there is a way to 
>> "hide" part of the URL (never used them before :) ) If someone has an 
>> answer to this, perhaps updating the FAQ would be good.
>>
>> Thanks in advance,
>>
>> Phil
>>
>>
>> ---------------------------------------------------------------------
>> Please check that your question has not already been answered in the
>> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>>
>> To unsubscribe, e-mail: <co...@xml.apache.org>
>> For additional commands, e-mail: <co...@xml.apache.org>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


AW: FAQ - How do I hide "cocoon" in the URL

Posted by Reinhard Potz <re...@gmx.net>.
 > -----Ursprungliche Nachricht-----
 > Von: Phil Blake [mailto:phil@tcp.net.au]
 > Gesendet: Mittwoch, 12. Dezember 2001 07:34
 > An: cocoon-users@xml.apache.org
 > Betreff: Re: FAQ - How do I hide "cocoon" in the URL
 >
 >
 > > What they're referring to in the FAQ is that, by default, all URL's
 > > contain "cocoon" in them, since usually cocoon resides in a "cocoon"
 > > sub-dir under, say, Tomcat.  They provide directions how to take
 > > "cocoon" out of the URL.
 >
 > I've used the method in the FAQ and it works fine but it does not "hide"
 > cocoon. It just saves you typing it the first time and performs a
 > redirect to get "cocoon" back into the URL.
 >
 > Have I missed something here?
 >
 > Both the following (from the example) perform redirects and therefore
 > don't hide "cocoon" - you just don't need to type it the first time.
 >
 > RewriteRule ^/Foo /cocoon/Foo/ [R]
 > RewriteRule ^/Foo(.*) /cocoon/Foo$1 [R]
 >
 > Please correct me if I'm wrong... I so want to be wrong :)
 >
 > Thanks again,
 >
 > Phil
 >

Another possibility is the Apache webserver module "mod_proxy". Have a look
at http://www.apacheref.com/ref/mod_proxy/ProxyPassReverse.html and
http://www.apacheref.com/ref/mod_proxy/ProxyPass.html

Reinhard


 >
 > ---------------------------------------------------------------------
 > Please check that your question has not already been answered in the
 > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
 >
 > To unsubscribe, e-mail: <co...@xml.apache.org>
 > For additional commands, e-mail: <co...@xml.apache.org>
 >


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: FAQ - How do I hide "cocoon" in the URL

Posted by Phil Blake <ph...@tcp.net.au>.
> What they're referring to in the FAQ is that, by default, all URL's 
> contain "cocoon" in them, since usually cocoon resides in a "cocoon" 
> sub-dir under, say, Tomcat.  They provide directions how to take 
> "cocoon" out of the URL.

I've used the method in the FAQ and it works fine but it does not "hide" 
cocoon. It just saves you typing it the first time and performs a 
redirect to get "cocoon" back into the URL.

Have I missed something here?

Both the following (from the example) perform redirects and therefore 
don't hide "cocoon" - you just don't need to type it the first time.

RewriteRule ^/Foo /cocoon/Foo/ [R]
RewriteRule ^/Foo(.*) /cocoon/Foo$1 [R]

Please correct me if I'm wrong... I so want to be wrong :)

Thanks again,

Phil


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: FAQ - How do I hide "cocoon" in the URL

Posted by David Rosenstrauch <da...@dti.net>.
What they're referring to in the FAQ is that, by default, all URL's contain "cocoon" in them, since usually cocoon resides in a "cocoon" sub-dir under, say, Tomcat.  They provide directions how to take "cocoon" out of the URL.

I'm not sure what you're asking though.  What part of the URL are you trying to hide?  You probably already know that the URL request parameters (e.g., index.html?parm1=a&parm2=b) can be hidden by using method=POST, so I assume you're not asking about this.

If you can provide more details about what you're trying to hide, perhaps I can help.


DR


At 02:59 PM 12/12/01 +1100, you wrote:
>I wish to "hide" part of the URL from the user.
>
>I noticed on the cocoon web site there is a FAQ with the title:  How do i hide "cocoon" in the URL's once i integrate using mod_jk as shown above?
>
>FYI: The example in the cocoon FAQ doesn't so much "hide" anything in the URL, rather presents the full URL immediately to the user - the complete opposite of the desired result.
>
>I'll have a play with rewrite and aliases to see if there is a way to "hide" part of the URL (never used them before :) ) If someone has an answer to this, perhaps updating the FAQ would be good.
>
>Thanks in advance,
>
>Phil
>
>
>---------------------------------------------------------------------
>Please check that your question has not already been answered in the
>FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
>To unsubscribe, e-mail: <co...@xml.apache.org>
>For additional commands, e-mail: <co...@xml.apache.org>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>