Re: url
Re: url
- Subject: Re: url
- From: Kaj Hejer <email@hidden>
- Date: Sun, 13 Apr 2003 13:59:33 +0200
At 02:35 +0100 13-04-2003, Tomek Klas wrote:
Hello,
i am considering WO for another project, but my client is not happy
with the url length, namely the "cgi-bin/WebObjects" part of it.
is there any way, i can make it hide this part of the URL?
I know that news.bbc.co.uk do it.
any ideas?
See the email bellow:
--- begin forwarded text
Envelope-to: email@hidden
Subject: [SOLVED] c From URLs
From: Naden Franciscus <email@hidden>
To: email@hidden
Date: Mon, 13 Jan 2003 11:35:53 +0800
One for the archives .. Thanks to everyone who helped :)
Note: This does not discuss setting up WebObjects to generate the
correct URLs internally.
------------------------------------------------------------------------------------------------------------
If you are running Apache
------------------------------------------------------------------------------------------------------------
You can set the handler:
<Location /cgi-bin/<your_prefix_Instead_of_WebObjects>*>
SetHandler WebObjects
</Location>
OR
If you install the module mod_rewrite, you can rewrite the URL to be anything:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/Display/.*
RewriteRule ^/Display/(.*)$
http://www.someserver.com/cgi-bin/WebObjects/Display.woa/
------------------------------------------------------------------------------------------------------------
If you have access to the Adaptor
------------------------------------------------------------------------------------------------------------
Then you can recompile the Adaptor to not require WebObjects to be part
of incoming requests. The source is available at:
/Developer/Examples/WebObjects/Source/Adaptors/Apache/mod_WebObjects.c
Basically just look for WebObjects_alias and set it to anything you want.
------------------------------------------------------------------------------------------------------------
If you are deploying in a Servlet Container e.g. Tomcat
------------------------------------------------------------------------------------------------------------
If you deploy your app as a JSP application, all you need to do is add a
custom mapping in the web.xml file that gets deployed telling what URL
pattern to expect from the browser. Then you can use what ever you want.
<servlet>
<servlet-name>WOServletAdaptor</servlet-name>
<servlet-class>com.webobjects.jspservlet.WOServletAdaptor</servlet-class>
<load-on-startup>6</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>WOServletAdaptor</servlet-name>
<url-pattern>/MyCoolApp/*</url-pattern>
</servlet-mapping>
------------------------------------------------------------------------------------------------------------
If you don't mind using Frames
------------------------------------------------------------------------------------------------------------
An easier solution might be to put the app in a frame set. The URL
would then only
be the parent directory assuming the framset page is index.html.
_______________________________________________
WebObjects-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/webobjects-dev
--- end forwarded text
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
References: | |
| >url (From: Tomek Klas <email@hidden>) |